TypeScript chat
Beta
Target SDK design
typescript
import { BotConnectorClient } from "@botconnector/sdk";
const client = new BotConnectorClient();
const model = await client.llm("<publisher>/<model>");
const reply = await model.chat("Review this code");
console.log(reply.text);The source SDK is implemented and live-tested, but the npm package is not published. The example assumes the source boundary is available locally.
Working today via OpenAI-compatible API
typescript
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "http://127.0.0.1:11435/v1", apiKey: "not-needed" });
const resp = await client.chat.completions.create({
model: "<publisher>/<model>",
messages: [{ role: "user", content: "Review this code" }],
});
console.log(resp.choices[0].message.content);For the current terminal workflow, use BCCLI. Endpoint reference: POST /v1/chat/completions.