模型

interface Model

Interface that provides a common interface for interacting with different LLMs.

Inheritors

属性(Properties)

Link copied to clipboard

该模型支持一些可选功能,这些功能会改变 ADK(Android Development Kit)生成请求的方式。默认情况下,只有某些特定模型的才能使用这些可选功能。 名称 是一个 gemini-2.* 名称不完整(或缺少某些信息)。 LlmCapabilities.outputSchemaAndTools. 如果需要更改默认设置,可以覆盖此选项(例如)。 LlmCapabilities(outputSchemaAndTools = false) 为了得到最终的答案…… set_model_response 除了这些工具之外……

Link copied to clipboard
abstract val name: String

模型的名称。

函数

Link copied to clipboard

建立一条实时(双向流传输)连接,该连接的配置由用户自行完成。 LlmRequest.liveConnectConfig.

Link copied to clipboard
abstract fun generateContent(request: LlmRequest, stream: Boolean = false): Flow<LlmResponse>

为给定的内容生成相应的内容。 LlmRequest这会返回一个结果。 Flow 的 LlmResponses.