Docs: Demo API
Streaming LLM example for KYBRIQ demo.
How we're different
- Ops-first, not checks-first.
- Policy-gated actions with human approvals.
- Evidence binders by default.
Trust rule: AI drafts; humans decide for sensitive outcomes.
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.OPENAI_API_KEY ?? "local-dev-key",
baseURL: process.env.OPENAI_BASE_URL ?? "http://localhost:8000/v1",
});
export async function chat(messages: any[]) {
const res = await client.chat.completions.create({
model: process.env.LLM_MODEL ?? "frontierrl-model",
temperature: 1.0,
top_p: 0.95,
messages,
});
return res.choices[0]?.message?.content ?? "";
}