@engenty/wizards (英语)
许可证:FSL-1.1-MIT,可用来源 (单位:千美元)自由主义) (中文(简体) ).
什么代码外的 诱惑法师进口, 一个子路径每次使用。 运行时间和工作室 诱惑法师不在其中.
| 导入 | 这是什么 | 文档 |
|---|---|---|
@engenty/wizards/plugin | 插件服务器的一半 : definePlugin 类型 | docs/content/dev/plugins |
@engenty/wizards/plugin/studio | 插件工作室的一半 : defineStudioPlugin | docs/content/dev/plugins/studio.md |
@engenty/wizards/plugin/thread | 信使频道 : ThreadDoor | docs/content/dev/plugins/runners.md |
@engenty/wizards/openui | 向导在 打开UI 聊天时间: Wizard 组件 | docs/content/dev/integration/openui.md |
@engenty/wizards/openui/server | 其服务器的一半: 聊天提示的规则和向导列表 | |
@engenty/wizards/openui/styles.css | 风格 Wizard 组件绘图 |
OpenUI 聊天中的向导
聊天模式决定一个巫师运行和它已经知道的东西. 向导然后运行
在对话中,作者对对话作了界定,由跑者取出(packages/runner(单位:千美元)
聊天的专页.
// The browser
import "@engenty/wizards/openui/styles.css";
import { addWizard, configureWizards, Wizard } from "@engenty/wizards/openui";
import { openuiChatLibrary } from "@openuidev/react-ui/genui-lib";
configureWizards({ runtime: "/wizards-runtime" }); // where the runtime answers
const library = addWizard(openuiChatLibrary, Wizard);
// The server that builds the system prompt
import { addWizard, loadWizards, wizardRules } from "@engenty/wizards/openui/server";
const wizards = await loadWizards("http://localhost:24368", ["<token>"]);
const prompt = addWizard(openuiChatLibrary).prompt({
...openuiChatPromptOptions,
additionalRules: [...(openuiChatPromptOptions.additionalRules ?? []), ...wizardRules(wizards)],
});
模特儿写道: Wizard("<token>", "<note>", {plate: "W-12345"})预填开始
页面的字段,而个人仍然看到并发送每个页面。 当运行完成时
组件发送 a continue_conversation 以结果的案文为背景采取行动
继续聊天 尝试用: examples/openui-chat。 。 。 .
包裹
每一版都发布到npm(scripts/npm-package.mjs, (中文(简体) ), .github/workflows/release.yml) (中文(简体) ).
pnpm --filter @engenty/wizards build 写入 dist/ 随船而行scripts/build.mjs:
/openui 与跑道和它使用的共享模块组合在一起,其类型包含在内
跑车 runner.css 作为 styles.css;每个其他软件包都保留导入,库为
dependencies,反应,OpenUI,Zod和细雨作为同龄人. 里面所有东西都进口
来源.
许可证
FSL -1.1 -MIT,像存储器. dist/openui 捆绑跑跑者( r)packages/runner页:1
麻省理工学院:它的执照船在旁边作为 dist/openui/LICENSE-MIT。 。 。 .