| title | ChatTzafon |
|---|
Tzafon is a research firm building scalable compute systems and foundation models for real-world interaction. The ChatTzafon class provides access to Tzafon's OpenAI-compatible Chat Completions API.
Install the integration package:
```bash npm npm install @tzafon/langchain-tzafon ``` ```bash pnpm pnpm add @tzafon/langchain-tzafon ```Get an API key from tzafon.ai and set it as an environment variable:
export TZAFON_API_KEY="your-api-key"import { ChatTzafon } from "@tzafon/langchain-tzafon";
const model = new ChatTzafon({
model: "tzafon.sm-1",
temperature: 0,
maxTokens: 1024,
apiKey: process.env.TZAFON_API_KEY,
});import { HumanMessage } from "@langchain/core/messages";
const messages = [new HumanMessage("Hello, how are you?")];
const response = await model.invoke(messages);
console.log(response.content);const stream = await model.stream(messages);
for await (const chunk of stream) {
process.stdout.write(chunk.content);
}| Model | Description |
|---|---|
tzafon.sm-1 |
General-purpose chat model |
tzafon.northstar.cua.sft |
Model trained for web navigation |
Use the List Models API to get the latest available models.
For detailed API documentation, see the Tzafon SDK documentation.