chat

open suspend override fun chat(request: ChatRequest): ChatResponse

Sends request to the Chat Completions API and returns the model's answer.

Throws

when the API cannot be reached, when it returns an error, and when the model declines the request.