UNPKG

@clearcompass-ai/llm-spec

Version:

A Vercel AI SDK provider for the LARS agent-based backend.

50 lines (49 loc) 1.7 kB
/** * @file src/index.ts * * This file is the main entry point for the @clearcompass-ai/llm-spec package. * It exports the necessary functions and types for consumers to interact with * the LARS (Legal Agent Reasoning System) provider. * * By convention, developers will import from this file, e.g.: * `import { lars, createLars } from '@clearcompass-ai/llm-spec';` */ import { createLars, LarsProviderSettings } from './lars-provider'; /** * A default, singleton instance of the LARS provider. * This is the easiest way for applications to get started, as it uses * default settings (reading the API URL from environment variables). * * @example * import { lars } from '@clearcompass-ai/llm-spec'; * import { streamText } from 'ai'; * * const { textStream } = await streamText({ * model: lars.languageModel('caselaw'), * // ... * }); */ export declare const lars: import("./lars-provider").LarsProvider; /** * The factory function for creating a customized LARS provider instance. * Use this when you need to override default settings, such as providing a * specific `baseURL` for the LARS backend API. * * @example * import { createLars } from '@clearcompass-ai/llm-spec'; * * const larsStagingProvider = createLars({ * baseURL: 'https://staging.api.your-lars-backend.com', * }); */ export { createLars }; /** * The TypeScript type definition for the LARS provider instance. * This is useful for type-hinting and ensuring strong type safety in * applications that use the provider. */ export type LarsProvider = ReturnType<typeof createLars>; /** * The TypeScript type definition for the LARS provider's settings object. */ export type { LarsProviderSettings };