UNPKG

aiwrapper

Version:

A Universal AI Wrapper for JavaScript & TypeScript

19 lines (18 loc) 659 B
import { LangMessage, LangOptions, LangResult, LanguageProvider } from "../language-provider.ts"; import { LangMessages } from "../messages.ts"; export type CohereLangOptions = { apiKey: string; model?: string; systemPrompt?: string; maxTokens?: number; }; export declare class CohereLang extends LanguageProvider { private _apiKey; private _model; private _systemPrompt; private _maxTokens?; private modelInfo?; constructor(options: CohereLangOptions); ask(prompt: string, options?: LangOptions): Promise<LangResult>; chat(messages: LangMessage[] | LangMessages, options?: LangOptions): Promise<LangResult>; }