Skip to content

Commit

Permalink
finish up last bits of issue 276 (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
robch authored Jul 5, 2024
1 parent 341a900 commit add575c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ai/commands/chat_command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ private async Task<Func<string, Task>> GetAssistantsAPITextHandlerAsync(bool int
var client = CreateAssistantClient();
var thread = await CreateOrGetAssistantThread(client, threadId);

_ = CheckWriteChatHistoryOutputFileAsync(client, thread);

threadId = thread.Id;
_values.Reset("chat.thread.id", threadId);

Expand All @@ -241,6 +243,8 @@ private Func<string, Task> GetChatCompletionsTextHandler(bool interactive)
var chatClient = client.GetChatClient(deployment);

var options = CreateChatCompletionOptions(out var messages);
CheckWriteChatHistoryOutputFile(messages);

var funcContext = CreateChatCompletionsFunctionFactoryAndCallContext(messages, options);

return async (string text) =>
Expand Down

0 comments on commit add575c

Please sign in to comment.