@@ -34,8 +34,8 @@ type UsageCost struct {
3434// 2. The incremental chat history visible to the user (including tool call results and assistant responses).
3535// 3. Cost information (in USD).
3636// 4. An error, if any occurred during the process.
37- func (a * AIClientV2 ) ChatCompletionV2 (ctx context.Context , userID bson.ObjectID , projectID string , modelSlug string , messages OpenAIChatHistory , llmProvider * models.LLMProviderConfig ) (OpenAIChatHistory , AppChatHistory , UsageCost , error ) {
38- openaiChatHistory , inappChatHistory , usage , err := a .ChatCompletionStreamV2 (ctx , nil , userID , projectID , "" , modelSlug , messages , llmProvider )
37+ func (a * AIClientV2 ) ChatCompletionV2 (ctx context.Context , userID bson.ObjectID , projectID string , modelSlug string , messages OpenAIChatHistory , llmProvider * models.LLMProviderConfig , customModel * models. CustomModel ) (OpenAIChatHistory , AppChatHistory , UsageCost , error ) {
38+ openaiChatHistory , inappChatHistory , usage , err := a .ChatCompletionStreamV2 (ctx , nil , userID , projectID , "" , modelSlug , messages , llmProvider , customModel )
3939 if err != nil {
4040 return nil , nil , usage , err
4141 }
@@ -64,7 +64,7 @@ func (a *AIClientV2) ChatCompletionV2(ctx context.Context, userID bson.ObjectID,
6464// - If tool calls are required, it handles them and appends the results to the chat history, then continues the loop.
6565// - If no tool calls are needed, it appends the assistant's response and exits the loop.
6666// - Finally, it returns the updated chat histories, accumulated cost, and any error encountered.
67- func (a * AIClientV2 ) ChatCompletionStreamV2 (ctx context.Context , callbackStream chatv2.ChatService_CreateConversationMessageStreamServer , userID bson.ObjectID , projectID string , conversationId string , modelSlug string , messages OpenAIChatHistory , llmProvider * models.LLMProviderConfig ) (OpenAIChatHistory , AppChatHistory , UsageCost , error ) {
67+ func (a * AIClientV2 ) ChatCompletionStreamV2 (ctx context.Context , callbackStream chatv2.ChatService_CreateConversationMessageStreamServer , userID bson.ObjectID , projectID string , conversationId string , modelSlug string , messages OpenAIChatHistory , llmProvider * models.LLMProviderConfig , customModel * models. CustomModel ) (OpenAIChatHistory , AppChatHistory , UsageCost , error ) {
6868 openaiChatHistory := messages
6969 inappChatHistory := AppChatHistory {}
7070 usage := UsageCost {}
0 commit comments