tencent_with_config

Function tencent_with_config 

Source
pub fn tencent_with_config(
    api_key: &str,
    base_url: Option<&str>,
    timeout_secs: Option<u64>,
    proxy: Option<&str>,
) -> Result<TencentProvider, LlmConnectorError>
Expand description

创建带有自定义配置的腾讯云混元服务提供商

§参数

  • api_key: API 密钥
  • base_url: 自定义基础 URL (可选,默认为腾讯云混元端点)
  • timeout_secs: 超时时间(秒) (可选)
  • proxy: 代理 URL (可选)

§示例

use llm_connector::providers::tencent_with_config;

let provider = tencent_with_config(
    "sk-YMiR2Q7LNWVKVWKivkfPn49geQXT27OZXumFkSS3Ef6FlQ50",
    None, // 使用默认 URL
    Some(60), // 60秒超时
    None
).unwrap();