Baseline project
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
mod access_token;
|
||||
mod common;
|
||||
mod message;
|
||||
#[macro_use]
|
||||
mod macros;
|
||||
mod model;
|
||||
mod stream;
|
||||
|
||||
pub use crate::function::ToolCall;
|
||||
pub use common::*;
|
||||
pub use message::*;
|
||||
pub use model::*;
|
||||
pub use stream::*;
|
||||
|
||||
register_client!(
|
||||
(openai, "openai", OpenAIConfig, OpenAIClient),
|
||||
(
|
||||
openai_compatible,
|
||||
"openai-compatible",
|
||||
OpenAICompatibleConfig,
|
||||
OpenAICompatibleClient
|
||||
),
|
||||
(gemini, "gemini", GeminiConfig, GeminiClient),
|
||||
(claude, "claude", ClaudeConfig, ClaudeClient),
|
||||
(cohere, "cohere", CohereConfig, CohereClient),
|
||||
(
|
||||
azure_openai,
|
||||
"azure-openai",
|
||||
AzureOpenAIConfig,
|
||||
AzureOpenAIClient
|
||||
),
|
||||
(vertexai, "vertexai", VertexAIConfig, VertexAIClient),
|
||||
(bedrock, "bedrock", BedrockConfig, BedrockClient),
|
||||
);
|
||||
|
||||
pub const OPENAI_COMPATIBLE_PROVIDERS: [(&str, &str); 18] = [
|
||||
("ai21", "https://api.ai21.com/studio/v1"),
|
||||
(
|
||||
"cloudflare",
|
||||
"https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/v1",
|
||||
),
|
||||
("deepinfra", "https://api.deepinfra.com/v1/openai"),
|
||||
("deepseek", "https://api.deepseek.com"),
|
||||
("ernie", "https://qianfan.baidubce.com/v2"),
|
||||
("github", "https://models.inference.ai.azure.com"),
|
||||
("groq", "https://api.groq.com/openai/v1"),
|
||||
("hunyuan", "https://api.hunyuan.cloud.tencent.com/v1"),
|
||||
("minimax", "https://api.minimax.chat/v1"),
|
||||
("mistral", "https://api.mistral.ai/v1"),
|
||||
("moonshot", "https://api.moonshot.cn/v1"),
|
||||
("openrouter", "https://openrouter.ai/api/v1"),
|
||||
("perplexity", "https://api.perplexity.ai"),
|
||||
(
|
||||
"qianwen",
|
||||
"https://dashscope.aliyuncs.com/compatible-mode/v1",
|
||||
),
|
||||
("xai", "https://api.x.ai/v1"),
|
||||
("zhipuai", "https://open.bigmodel.cn/api/paas/v4"),
|
||||
// RAG-dedicated
|
||||
("jina", "https://api.jina.ai/v1"),
|
||||
("voyageai", "https://api.voyageai.com/v1"),
|
||||
];
|
||||
Reference in New Issue
Block a user