* feat: add support for custom message timestamps in API - Introduced `created_at` parameter for message creation, allowing users to specify custom timestamps. - **Single source of truth for timestamp string format** - Updated SDK documentation to reflect this new feature and its use cases. - Enhanced validation schemas to include the optional `created_at` field. - Added tests to verify functionality for messages with and without custom timestamps, ensuring correct behavior and default timestamp usage. * feat: add timestamp option to sdks * feat: Add get summaries endpoints * feat: WIP basic SDK implementation blocked until stainless release * feat: Implement SDKs with honcho-core methods * fix (sdk): Used release 1.4.0 core sdks * fix: Code Rabbit * chore: Pytest errors --------- Co-authored-by: Benjamin McCormick <docterformer@protonmail.com> |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| examples | ||
| src | ||
| .gitignore | ||
| CHANGELOG.md | ||
| README.md | ||
| biome.json | ||
| bun.lock | ||
| jest.config.js | ||
| package.json | ||
| tsconfig.json | ||
README.md
Honcho TypeScript SDK
A high-level, ergonomic TypeScript SDK for the Honcho conversational memory platform. This library wraps honcho-node-core to provide a user-friendly, Pythonic API for managing peers, sessions, and conversational context.
Installation
npm install @honcho-ai/sdk
Usage
import { Honcho } from "@honcho-ai/sdk";
const honcho = new Honcho({
apiKey: process.env.HONCHO_API_KEY,
baseUrl: "http://localhost:8000",
workspaceId: "test",
});
const assistant = honcho.peer("bob");
const alice = honcho.peer("alice");
await honcho.getPeers();
const session = honcho.session("session_1");
await session.addPeers([alice, assistant]);
await session.addMessages([
assistant.message("What did you have for breakfast today, alice?"),
alice.message("I had oatmeal."),
]);
const response = await alice.chat("what did alice have for breakfast today?");
console.log(response);
See examples/ for more.