聊天已完成的任务(或操作)

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
constructor(name: String, apiKey: String? = null, httpOptions: HttpOptions? = null)

创建一个 ChatCompletions 该模型由一个与 OpenAI 兼容的聊天补全(Chat Completions)端点提供支持。

constructor(name: String, httpOptions: HttpOptions? = null, apiKeyProvider: () -> String)

创建一个 ChatCompletions 该模型会调用其他函数或方法(即进行“调用”操作)。 apiKeyProvider 在每次请求之前,系统会检查那些即将过期的密钥(例如 Google Cloud 的访问令牌)。

类型

Link copied to clipboard
object Companion

属性(Properties)

Link copied to clipboard
Link copied to clipboard
open override val name: String

函数

Link copied to clipboard
Link copied to clipboard
open override fun generateContent(request: LlmRequest, stream: Boolean): Flow<LlmResponse>