@g9tm/援助人员
G9AI助手的无头客户端:屏幕需要的一切,没有DOM,没有框架和运行时间 依赖性。 Svelte和ReactLynx包画出它;一个主机可以用其他任何东西画出它.
- 助理 HTTP 端点的 API 客户端, 超越主机本身
fetch,所以签入,信头和基址 留在东道主的. - 运行状态:对话、信息、工作卡、等待确认的计划(飞行中的一项确认) ),提问,附件和助手模式,作为订阅的一幅快照.
- 传输:当主机给出时的流
EventSource或同步的回答 回到民意调查中. - 查看块的模型(表格、图表、KPI、比较),安全文本,链接仅限于主机自己的主机, 笔录和波斯语帮助者(数字,数字,方向).
@g9tm/aiassistant/admin:管理器页面的阅读器(能力、使用、呼叫、时间表、使用窗口).
import { createAssistant } from "@g9tm/aiassistant";
import type { AssistantHost } from "@g9tm/aiassistant";
const host: AssistantHost = {
locale: "en",
dir: "ltr",
theme: { mode: "light", tokens: {} },
reducedMotion: false,
async fetch(input, init) {
const r = await fetch(input, { method: init?.method ?? "GET", headers: init?.headers, body: init?.body as BodyInit | undefined });
return { status: r.status, ok: r.ok, text: () => r.text() };
},
};
const assistant = createAssistant(host);
const stop = assistant.subscribe((s) => console.log(s.busy, s.messages.length));
await assistant.send("Sales of last week?");
stop();
G9AI助理图书馆的一部分. 文件:见与图书馆一起航行的指南.