Skip to main content

Responses

Response types returned by the Gateway methods.

CompleteChatHandlerResponseType

Returned by gateway.completeChat().

Fields

response
MessageType
required
The assistant’s response message. See Message Types.
usage
object
required
Token usage statistics.
toolCalls
ToolCallType[]
Tool calls requested by the model. Pass these to gateway.getToolResponses() to execute them.

StreamChatHandlerResponseType

Yielded by the async generator from gateway.streamChat().

GetEmbeddingsHandlerResponseType

Returned by gateway.getEmbeddings().

GatewayError

The error class thrown by all Gateway methods.