开发资源
GeniSpace 提供开源组件与 SDK,支持开发者基于平台构建 AI 应用、自定义算子与聊天插件。本章介绍可用的开发资源与入口。
GeniSpace 开发社区
GitHub 组织:https://github.com/genispace
GeniSpace 在 GitHub 上维护多个开源项目,涵盖 SDK、算子框架、聊天插件等,开发者可在此获取源码、提交 Issue 与 Pull Request。
JavaScript SDK
仓库:https://github.com/genispace/sdk-javascript
基于 GeniSpace 平台开发 AI 应用的官方 JavaScript/TypeScript SDK,提供完整的 API 访问能力。
主要能力
- 用户管理、API 密钥管理
- 智能体管理、对话与任务执行
- 任务管理、执行与日志
- 类型安全、自动重试、统一错误处理
快速开始
npm install genispace
import GeniSpace from 'genispace';
const client = new GeniSpace({
apiKey: 'your-api-key',
baseURL: 'https://api.genispace.ai' // 中国区可使用 https://api.genispace.cn
});
const user = await client.users.getProfile();
详细用法请参考 SDK 仓库 README 与 开发文档 SDK 章节。
开源算子框架
仓库:https://github.com/genispace/genispace-operators-custom
零学习成本的算子开发框架,基于标准 OpenAPI 规范,将业务服务快速封装为 GeniSpace 可用的算子。
主要特点
- 基于 OpenAPI 3.0,无需学习新语法
- 配置文件 + 路由文件即可完成算子开发
- 支持 GeniSpace 平台 API Key 认证
- 可一键导入到 GeniSpace 平台
快速开始
git clone https://github.com/genispace/genispace-operators-custom.git
cd genispace-operators-custom
npm install
npm start
详细开发指南请参考 算子仓库 README。
智能体聊天插件
仓库:https://github.com/genispace/chat-plugins
为 GeniSpace 聊天应用开发远程插件的框架,支持自定义对话界面、表单、审批流程等。
主要特点
- 独立部署,通过 HTTP URL 动态加载
- 基于 React 的插件开发
- 支持插件与 Chat 应用的双向通信
- 内置示例:Hello World、报销申请、差旅申请等
快速开始
git clone https://github.com/genispace/chat-plugins.git
cd chat-plugins
npm install
npm run dev
详细开发指南请参考 插件仓库 README。