quivr-typechat
Version:
A TypeChatLanguageModel compatible with Quivr API to run TpeChat on your own Quivr istance with the possibility of using a private LLM
27 lines (26 loc) • 1.4 kB
TypeScript
import { TypeChatLanguageModel } from "typechat";
interface QuivrLanguageModelConfig {
endpoint?: string;
model?: string;
max_tokens?: number;
}
/**
* Creates a language model encapsulation of a Quivr REST API from environnement variables.
* @param env Envirement variables
* @param additionalConfig The additionnal configuration for the QuivrLanguageModel :
* endpoint: API endpoint for Quivr. Defaults to https://api.quivr.app
* model: Model to use in the Quivr instance. Defaults to gpt-3.5-turbo-0613
* max_tokens: Maximum tokens. Defaults to 250
*/
export declare function createQuivrLanguageModel(env: Record<string, string | undefined>, additionalConfig?: QuivrLanguageModelConfig): TypeChatLanguageModel;
/**
* Creates a language model encapsulation of a Quivr REST API endpoint with parameters.
* @param apiKey The Quivr API key.
* @param brain_id The brain to use for this model
* @param options The additionnal configuration for the QuivrLanguageModel :
* endpoint: API endpoint for Quivr. Defaults to https://api.quivr.app
* model: Model to use in the Quivr instance. Defaults to gpt-3.5-turbo-0613
* max_tokens: Maximum tokens. Defaults to 250
*/
export declare const createQuivrLanguageModelExplicit: (apiKey: string, brain_id: string, options?: QuivrLanguageModelConfig) => TypeChatLanguageModel;
export {};