ADK for TypeScript: API Reference
    Preparing search index...

    Interface LlmRequest

    这是一个用于 LLM(大型语言模型)的请求类,允许将工具、输出格式以及系统指令传递给模型。

    interface LlmRequest {
        allowedTools?: string[];
        config?: GenerateContentConfig;
        contents: Content[];
        liveConnectConfig: LiveConnectConfig;
        model?: string;
        previousInteractionId?: string;
        toolsDict: { [key: string]: BaseTool };
    }
    allowedTools?: string[]

    允许使用的工具集合,这些工具由请求处理器(request processors)来管理/填充。

    config?: GenerateContentConfig

    用于生成内容的请求的附加配置信息。 在 `generateContentConfig` 中设置的工具不应被直接修改,应使用 `appendTools` 方法来添加新的工具。

    contents: Content[]

    需要发送给模型的数据内容。

    liveConnectConfig: LiveConnectConfig
    model?: string

    模型名称。

    previousInteractionId?: string

    上一轮交互中产生的交互 ID(如果有的话)。

    toolsDict: { [key: string]: BaseTool }

    工具字典(tools dictionary):该字典不会被包含在 JSON 数据序列化结果中(即不会被输出到 JSON 文件中)。