ChatCompletions
A Model for OpenAI's Chat Completions API and the endpoints compatible with it, such as Gemini and Vertex AI Model Garden models, xAI's Grok, Groq, Mistral, Together, or a local server.
Supports streaming, function calling, structured output, image input, and token usage. A user turn with audio or a non-image file fails with IllegalArgumentException, and logprobs are not returned.
Constructors
Link copied to clipboard
Creates a ChatCompletions model backed by an OpenAI-compatible Chat Completions endpoint.
Creates a ChatCompletions model that calls apiKeyProvider before each request, for a key that expires, such as a Google Cloud access token.