File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/Infrastructure/BotSharp.Core.Realtime/Services Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -116,13 +116,14 @@ await _completer.Connect(_conn,
116
116
}
117
117
else
118
118
{
119
- // Push dialogs into model context
119
+ // Append dialogs into model context
120
+ var history = "[CONVERSATION HISTORY]\r \n " ;
120
121
foreach ( var message in dialogs )
121
122
{
122
- await _completer . InsertConversationItem ( message ) ;
123
+ history += $ " { message . Role } : { message . Content } \r \n " ;
123
124
}
124
125
125
- await _completer . TriggerModelInference ( $ "{ instruction } \r \n \r \n Assist user without repeating your previous statement.") ;
126
+ await _completer . TriggerModelInference ( $ "{ instruction } \r \n \r \n { history } \r \n \r \ n Assist user without repeating your previous statement.") ;
126
127
}
127
128
} ,
128
129
onModelAudioDeltaReceived : async ( audioDeltaData , itemId ) =>
You can’t perform that action at this time.
0 commit comments