File tree 2 files changed +19
-3
lines changed
2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -34,10 +34,26 @@ const options = {
34
34
method : LogFn
35
35
) : void {
36
36
const [ arg1 , ...rest ] = inputArgs ;
37
+
37
38
if ( typeof arg1 === "object" ) {
38
- return method . apply ( this , [ arg1 , ...rest ] ) ;
39
+ const messageParts = rest . map ( arg =>
40
+ typeof arg === "string" ? arg : JSON . stringify ( arg )
41
+ ) ;
42
+ const message = messageParts . join ( " " ) ;
43
+ return method . apply ( this , [ arg1 , message ] ) ;
39
44
} else {
40
- return method . apply ( this , [ ...rest , arg1 ] ) ;
45
+ const context = { } ;
46
+ const messageParts = [ arg1 , ...rest ] . map ( arg =>
47
+ typeof arg === "string" ? arg : arg
48
+ ) ;
49
+ const message = messageParts
50
+ . filter ( part => typeof part === "string" )
51
+ . join ( " " ) ;
52
+ const jsonParts = messageParts . filter ( part => typeof part === "object" ) ;
53
+
54
+ Object . assign ( context , ...jsonParts ) ;
55
+
56
+ return method . apply ( this , [ context , message ] ) ;
41
57
}
42
58
} ,
43
59
} ,
Original file line number Diff line number Diff line change @@ -470,7 +470,7 @@ export class AgentRuntime implements IAgentRuntime {
470
470
this . character . knowledge . length > 0
471
471
) {
472
472
elizaLogger . info (
473
- `[RAG Check] RAG Knowledge enabled: ${ this . character . settings . ragKnowledge } `
473
+ `[RAG Check] RAG Knowledge enabled: ${ this . character . settings . ragKnowledge ? true : false } `
474
474
) ;
475
475
elizaLogger . info (
476
476
`[RAG Check] Knowledge items:` ,
You can’t perform that action at this time.
0 commit comments