@cobrowser/chatgpt

中文文档
0.7.55发布于 2026/10/29TypeScriptCommonJS近 30 天下载 5915

聊天服务, 将我们的项目与聊天 api 连接

中文使用文档
文档目录3 节
  1. 目前提供的服务
  2. 协作服务
  3. 翻译处

聊天游戏自由

用于与 ChatGPT API 合作的服务列表

Before working with the API make sure you have the `OPEN AI API KEY` in the env variables 
it should be avaliable with process.env.OPEN_AI_API_KEY

aPI 密钥将用来与 openAI API 授权 OPEN_AI_API_KEY process.env.OPEN_AI_API_KEY

目前提供的服务

我们将会有一份服务清单 用于不同目的

协作服务

可用于提出产品建议和快速答复建议的服务

使用量

提出一些快速的答复 谈话

const { CopilotService } = require('@cobrowser/chatgpt');
const copilotService = new CopilotService();
const conversation = `
  Customer: Hello
  Agent: Hello
  Customer: Need some help
`;

/**
 * return a promise that will resolve a string ( a list of suggestions )  or an undefined or an error
 */
copilotService.suggest(conversation);

翻译处

可用于将文本从一种语言翻译到另一种语言

使用量


const { TranslationService } = require('@cobrowser/chatgpt');
const service = new TranslationService();
const translation = await service.translate('Text to Translate');
translate(text: string, toLanguage = 'English', fromLanguage?: string)
By Default if languages didn't specifed the default language to translate to will be English 

所有服务都将有其 API 文档( 感谢 Typescript)

版本与发布记录

@cobrowser/chatgpt 共发布 95 个版本,首次发布于 2023/04/11;过去 12 个月发布了 27 个版本。

版本发布日期距今
0.7.55latest2026/10/2911 天前
0.7.542026/10/2218 天前
0.7.532026/10/2119 天前
0.7.522026/06/164 个月前
0.7.512026/06/015 个月前
0.7.502026/05/195 个月前

关于 @cobrowser/chatgpt 的常见问题

@cobrowser/chatgpt 是什么?

聊天服务, 将我们的项目与聊天 api 连接

如何安装 @cobrowser/chatgpt?

在项目目录运行 npm install @cobrowser/chatgpt,或使用 pnpm add / yarn add / bun add。

@cobrowser/chatgpt 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@cobrowser/chatgpt 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@cobrowser/chatgpt 可以商用吗?

@cobrowser/chatgpt 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@cobrowser/chatgpt 的下载量有多少?

根据 npm 官方下载统计,@cobrowser/chatgpt 在 2026/10/10 – 2026/11/08 这 30 天内被下载 5,915 次,日均约 197 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@cobrowser/chatgpt 还在维护吗?

最新版本 0.7.55 发布于 2026/10/29(11 天前);至今共发布 95 个版本,其中过去 12 个月发布了 27 个;首次发布于 2023/04/11。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。