OpenRouter TypeScript SDK - v1.0.6
GitHub
Examples
Preparing search index...
ChatCompletionChunk
Interface ChatCompletionChunk
Response chunk for SSE (Server-Sent Events) streaming
interface
ChatCompletionChunk
{
id
:
string
;
object
:
"chat.completion.chunk"
;
created
:
number
;
model
:
string
;
choices
:
{
index
:
number
;
delta
:
{
role
?:
ChatRole
;
content
?:
string
;
tool_calls
?:
{
index
:
number
;
id
?:
string
;
type
?:
"function"
;
function
?:
{
name
?:
string
;
arguments
?:
string
}
;
}
[]
;
}
;
finish_reason
?:
null
|
string
;
}
[]
;
}
Index
Properties
id
object
created
model
choices
Properties
id
id
:
string
object
object
:
"chat.completion.chunk"
created
created
:
number
model
model
:
string
choices
choices
:
{
index
:
number
;
delta
:
{
role
?:
ChatRole
;
content
?:
string
;
tool_calls
?:
{
index
:
number
;
id
?:
string
;
type
?:
"function"
;
function
?:
{
name
?:
string
;
arguments
?:
string
}
;
}
[]
;
}
;
finish_reason
?:
null
|
string
;
}
[]
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Properties
id
object
created
model
choices
GitHub
Examples
OpenRouter TypeScript SDK - v1.0.6
Loading...
Response chunk for SSE (Server-Sent Events) streaming