Aller au contenu

@mirego/forra-api


@mirego/forra-api / Chat API / chatCompletion

Function: chatCompletion()

chatCompletion(request, files?): Promise\<ChatCompletionResponse>

Synchronous chat completion that internally consumes the streaming API. This function waits for the entire stream to complete and returns the final result.

Supports both: - Stateless chat completion (with messages and optional assistant_id) - Conversation completion (with conversation_id and new_messages)

Parameters

request

ChatCompletionRequest

files?

File[]

Returns

Promise\<ChatCompletionResponse>