将您的 AI 应用程序所谈的都存储到 LLM API, MCP, A2A, AG-UI, 向量 DB, 搜索中. 一个包,一个端口,零依赖.
概览
https://github.com/user-attachments/assets/76815122-574a-48e1-b275-edae0a014667 一个包,一个端口,零依赖. LLM API,图像生成和编辑,文本对语音,转录,音频翻译和生成,视频生成,嵌入,MCP工具,A2A代理,AG-UI事件流,矢量数据库,搜索,再排行,并节制——没有键,没有网络,没有意外账单. Kotock嘲笑你的AI应用程序所谈的一切: 用 npx@copilotkit/aimock -- config octoc.json 在一个端口上运行它们,或者使用程序API来准确编曲你需要的东西.
概述(AI 翻译)
** 用于AI应用测试的移动基础设施——将您的SDK指向一个本地端口和每个供应商、协议和服务答案确定。 **
- 快速启动** ** 套房** ** 记录和重播** ** Docs**
https://github.com/user-attachments/assets/76815122-574a-48e1-b275-edae0a014667
一个包,一个端口,零依赖. LLM API 图像生成和 编辑、文本对语音、转录、音频翻译和生成、视频 生成、嵌入、 MCP 工具、 A2A 代理、 AG- UI 事件流、 向量 数据库、搜索、重新排序和节制——没有键、没有网络、没有惊喜 账单
□ 快开始
□ 目标套房
Kotock嘲笑你的AI应用程序所谈的一切:
游戏工具 嘲笑什么 医生 |—. |------------------------------------------------------------------------------------------------------------------------------------------------------------- – — - - - - - – - - - - - - - – - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
https://github.com/user-attachments/assets/76815122-574a-48e1-b275-edae0a014667
Quick Start
npm install @copilotkit/aimock
// The class is still named `LLMock` for back-compat after the v1.7.0 package
// rename from `@copilotkit/llmock` to `@copilotkit/aimock`.
import { LLMock } from "@copilotkit/aimock";
const mock = new LLMock({ port: 0 });
mock.onMessage("hello", { content: "Hi there!" });
await mock.start();
// Set env BEFORE importing/constructing the OpenAI (or other provider) client.
// Many SDKs cache the base URL at construction time — if the client is built
// before these are set, it will talk to the real API (surprise bills) instead
// of aimock.
process.env.OPENAI_BASE_URL = `${mock.url}/v1`;
process.env.OPENAI_API_KEY = "mock"; // SDK requires a value, even when base URL is mocked
// ... run your tests ...
await mock.stop();
The aimock Suite
aimock mocks everything your AI app talks to:
| Tool | What it mocks | Docs |
|---|
安装
npx -p @copilotkit/aimock llmock -p 4010 -f ./fixtures