0.3.7 • Published 4 months ago
erniebot.ts v0.3.7
文心一言 TypeScript SDK
在浏览器和 Nodejs 中调用文心一言的大模型能力且支持动态函数解析和插件
安装
pnpm add erniebot.ts
用法
查看 https://github.com/SOVLOOKUP/erniebot.ts/blob/main/test.ts
import { newSession } from 'erniebot.ts';
import Plugin from "erniebot-plugin-demo"
// 初始化会话(全部参数定义:https://github.com/SOVLOOKUP/erniebot.ts/blob/main/src/types.ts#L7)
const session = await newSession({ key: parsed.KEY, secret: parsed.SECRET })
// 添加插件
await session.addPlugin("test_plugin", Plugin)
// 开启对话
for await (const msg of await session.ask("你好")) {
console.log(msg)
}
插件
插件命名前戳: erniebot-plugin-
定义: https://github.com/SOVLOOKUP/erniebot.ts/blob/main/src/types.ts#L30
LISENCE
MIT
0.3.7
4 months ago
0.3.6
6 months ago
0.3.5
6 months ago
0.3.3
6 months ago
0.3.2
6 months ago
0.3.1
6 months ago
0.3.0
6 months ago
0.2.9
6 months ago
0.2.8
6 months ago
0.2.7
6 months ago
0.2.6
6 months ago
0.2.5
6 months ago
0.2.3
6 months ago
0.2.2
6 months ago
0.2.1
6 months ago
0.2.0
6 months ago
0.1.2
6 months ago
0.1.1
6 months ago
0.1.0
6 months ago
0.0.9
6 months ago
0.0.8
6 months ago
0.0.7
6 months ago
0.0.6
6 months ago
0.0.4
6 months ago
0.0.3
6 months ago
0.0.2
6 months ago
0.0.1
6 months ago