Merge pull request #192 from hchen2020/master

Populate states for ResponseTemplateService
This commit is contained in:
Haiping 2023-10-25 20:08:17 -05:00 committed by GitHub
commit 155c5c4022
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,6 +35,10 @@ public class ResponseTemplateService : IResponseTemplateService
// Convert args and execute data to dictionary
var dict = new Dictionary<string, object>();
// Populate states
var state = _services.GetRequiredService<IConversationStateService>();
state.GetStates().Select(x => dict[x.Key] = x.Value).ToList();
if (message.FunctionArgs != null)
{
ExtractArgs(JsonSerializer.Deserialize<JsonDocument>(message.FunctionArgs), dict);