Skip to content

Commit

Permalink
Merge pull request #192 from hchen2020/master
Browse files Browse the repository at this point in the history
Populate states for ResponseTemplateService
  • Loading branch information
Oceania2018 committed Oct 26, 2023
2 parents d7ef99d + 7482339 commit 155c5c4
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ public async Task<string> RenderFunctionResponse(string agentId, RoleDialogModel
// 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);
Expand Down

0 comments on commit 155c5c4

Please sign in to comment.