UNPKG

@tanstack/ai

Version:

Type-safe TypeScript AI SDK for streaming chat, tool calling, agents, structured outputs, and multimodal generation.

24 lines (23 loc) 596 B
//#region src/activities/chat/adapter.ts /** * Abstract base class for text adapters. * Extend this class to implement a text adapter for a specific provider. * * Generic parameters match TextAdapter - all pre-resolved by the provider function. */ var BaseTextAdapter = class { kind = "text"; model; requires = void 0; config; constructor(config = {}, model) { this.config = config; this.model = model; } generateId() { return `${this.name}-${Date.now()}-${Math.random().toString(36).substring(7)}`; } }; //#endregion export { BaseTextAdapter }; //# sourceMappingURL=adapter.js.map