@@ -25,8 +25,8 @@ import (
2525// 1. The full chat history sent to the language model (including any tool call results).
2626// 2. The incremental chat history visible to the user (including tool call results and assistant responses).
2727// 3. An error, if any occurred during the process.
28- func (a * AIClientV2 ) ChatCompletionV2 (ctx context.Context , modelSlug string , messages OpenAIChatHistory , llmProvider * models.LLMProviderConfig ) (OpenAIChatHistory , AppChatHistory , error ) {
29- openaiChatHistory , inappChatHistory , err := a .ChatCompletionStreamV2 (ctx , nil , "" , modelSlug , messages , llmProvider )
28+ func (a * AIClientV2 ) ChatCompletionV2 (ctx context.Context , modelSlug string , messages OpenAIChatHistory , llmProvider * models.LLMProviderConfig , customModel * models. CustomModel ) (OpenAIChatHistory , AppChatHistory , error ) {
29+ openaiChatHistory , inappChatHistory , err := a .ChatCompletionStreamV2 (ctx , nil , "" , modelSlug , messages , llmProvider , customModel )
3030 if err != nil {
3131 return nil , nil , err
3232 }
@@ -54,7 +54,7 @@ func (a *AIClientV2) ChatCompletionV2(ctx context.Context, modelSlug string, mes
5454// - If tool calls are required, it handles them and appends the results to the chat history, then continues the loop.
5555// - If no tool calls are needed, it appends the assistant's response and exits the loop.
5656// - Finally, it returns the updated chat histories and any error encountered.
57- func (a * AIClientV2 ) ChatCompletionStreamV2 (ctx context.Context , callbackStream chatv2.ChatService_CreateConversationMessageStreamServer , conversationId string , modelSlug string , messages OpenAIChatHistory , llmProvider * models.LLMProviderConfig ) (OpenAIChatHistory , AppChatHistory , error ) {
57+ func (a * AIClientV2 ) ChatCompletionStreamV2 (ctx context.Context , callbackStream chatv2.ChatService_CreateConversationMessageStreamServer , conversationId string , modelSlug string , messages OpenAIChatHistory , llmProvider * models.LLMProviderConfig , customModel * models. CustomModel ) (OpenAIChatHistory , AppChatHistory , error ) {
5858 openaiChatHistory := messages
5959 inappChatHistory := AppChatHistory {}
6060
@@ -66,7 +66,7 @@ func (a *AIClientV2) ChatCompletionStreamV2(ctx context.Context, callbackStream
6666 }()
6767
6868 oaiClient := a .GetOpenAIClient (llmProvider )
69- params := getDefaultParamsV2 (modelSlug , a .toolCallHandler .Registry , llmProvider . IsCustomModel )
69+ params := getDefaultParamsV2 (modelSlug , a .toolCallHandler .Registry , customModel )
7070
7171 for {
7272 params .Messages = openaiChatHistory
0 commit comments