add reasoning block

This commit is contained in:
duanfuxiang
2025-02-18 11:02:24 +08:00
parent dc520535fc
commit d15681b0d5
12 changed files with 285 additions and 169 deletions

View File

@@ -21,6 +21,7 @@ export type ChatUserMessage = {
export type ChatAssistantMessage = {
role: 'assistant'
content: string
reasoningContent: string
id: string
metadata?: {
usage?: ResponseUsage
@@ -44,6 +45,7 @@ export type SerializedChatUserMessage = {
export type SerializedChatAssistantMessage = {
role: 'assistant'
content: string
reasoningContent: string
id: string
metadata?: {
usage?: ResponseUsage

View File

@@ -39,7 +39,8 @@ type NonStreamingChoice = {
type StreamingChoice = {
finish_reason: string | null
delta: {
content: string | null
content: string | null
reasoning_content: string | null
role?: string
}
error?: Error