@nickyzj2023/utils
Preparing search index...
ai
ChatCompletions
StreamResponse
Type Alias StreamResponse
流式响应中的单个 SSE 数据块(OpenAI 原始格式)
type
StreamResponse
=
{
choices
:
{
delta
:
{
content
?:
string
|
null
;
reasoning
?:
string
|
null
;
reasoning_content
?:
string
|
null
;
role
?:
Message
[
"role"
]
;
tool_calls
?:
{
function
?:
{
arguments
?:
string
;
name
?:
string
}
;
id
?:
string
;
index
:
number
;
type
?:
"function"
;
}
[]
;
}
;
finish_reason
:
"stop"
|
"length"
|
"tool_calls"
|
"content_filter"
|
null
;
index
:
number
;
}
[]
;
created
:
number
;
id
:
string
;
model
:
string
;
object
:
"chat.completion.chunk"
;
usage
?:
Usage
;
}
Index
Properties
choices
created
id
model
object
usage?
Properties
choices
choices
:
{
delta
:
{
content
?:
string
|
null
;
reasoning
?:
string
|
null
;
reasoning_content
?:
string
|
null
;
role
?:
Message
[
"role"
]
;
tool_calls
?:
{
function
?:
{
arguments
?:
string
;
name
?:
string
}
;
id
?:
string
;
index
:
number
;
type
?:
"function"
;
}
[]
;
}
;
finish_reason
:
"stop"
|
"length"
|
"tool_calls"
|
"content_filter"
|
null
;
index
:
number
;
}
[]
created
created
:
number
id
id
:
string
model
model
:
string
object
object
:
"chat.completion.chunk"
Optional
usage
usage
?:
Usage
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Properties
choices
created
id
model
object
usage
@nickyzj2023/utils
Loading...
流式响应中的单个 SSE 数据块(OpenAI 原始格式)