mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Support reasoning_content
This commit is contained in:
5 files changed
+169
-8
No files matched your search
@@ -18,6 +18,7 @@ interface UseAIChatSessionOptions {
|
||||
interface StreamingMessage {
|
||||
role: 'assistant';
|
||||
content: string;
|
||||
reasoning_content?: string;
|
||||
tool_calls?: OpenAI.Chat.Completions.ChatCompletionMessageToolCall[];
|
||||
}
|
||||
|
||||
@@ -68,16 +69,18 @@ export function useAIChat({
|
||||
setStreamingMessage({
|
||||
role: 'assistant',
|
||||
content: '',
|
||||
reasoning_content: '',
|
||||
});
|
||||
}
|
||||
}
|
||||
}, [projectId]);
|
||||
|
||||
useSessionSubscription('streamingUpdate', (updatedProjectId: string, content: string, toolCalls?: OpenAI.Chat.Completions.ChatCompletionMessageToolCall[]) => {
|
||||
useSessionSubscription('streamingUpdate', (updatedProjectId: string, content: string, reasoningContent?: string, toolCalls?: OpenAI.Chat.Completions.ChatCompletionMessageToolCall[]) => {
|
||||
if (updatedProjectId === projectId) {
|
||||
setStreamingMessage({
|
||||
role: 'assistant',
|
||||
content,
|
||||
reasoning_content: reasoningContent,
|
||||
tool_calls: toolCalls
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user