
ai client
一个支持多云协议的 Deepseek V3 模型客户端。
Repository Info
About This Server
一个支持多云协议的 Deepseek V3 模型客户端。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Deepseek V3 客户端
这是一个用TypeScript编写的客户端,用于连接Deepseek V3模型,并支持多云协议(MCP)。
功能特性
- 支持Deepseek V3模型API
- 多云协议(MCP)支持,便于切换不同的AI提供商
- 内置错误处理和重试机制
- 类型安全的API接口
安装
npm install
配置
cp .env.example .env
使用
开发模式
npm run dev
构建项目
npm run build
运行构建后的项目
npm start
示例
import { DeepseekClient } from './path-to-client';
// 初始化客户端
const client = new DeepseekClient();
// 使用Deepseek V3模型
async function main() {
const response = await client.chat.completions.create({
model: "deepseek-v3",
messages: [
{
role: "user",
content: "你好,请介绍一下自己"
}
]
});
console.log(response.choices[0].message.content);
}
main().catch(console.error);
AI提供商切换器使用
import { AIProviderSwitcher } from './path-to-ai-provider-switcher';
// 初始化AI提供商切换器
const providerSwitcher = new AIProviderSwitcher({
defaultProvider: 'deepseek',
providers: ['deepseek', 'openai']
});
// 使用AI提供商切换器
async function main() {
// 使用默认提供商
const response = await providerSwitcher.completions({
messages: [
{
role: "user",
content: "你好,请介绍一下自己"
}
]
});
console.log(response.choices[0].message.content);
// 显式指定提供商
const openaiResponse = await providerSwitcher.completions({
provider: 'openai',
model: 'gpt-4',
messages: [
{
role: "user",
content: "你好,请介绍一下自己"
}
]
});
}
main().catch(console.error);
Quick Start
Clone the repository
git clone https://github.com/ggce/ai-clientInstall dependencies
cd ai-client
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.