aiwrapper
Version:
A Universal AI Wrapper for JavaScript & TypeScript
22 lines (21 loc) • 798 B
TypeScript
import { LangOptions, LanguageProvider, LangMessage } from "../language-provider.ts";
import { LangMessages } from "../messages.ts";
export type GoogleLangOptions = {
apiKey: string;
model?: string;
systemPrompt?: string;
maxTokens?: number;
};
export declare class GoogleLang extends LanguageProvider {
private _apiKey;
private _model;
private _systemPrompt;
private _maxTokens?;
private modelInfo?;
constructor(options: GoogleLangOptions);
ask(prompt: string, options?: LangOptions): Promise<LangMessages>;
chat(messages: LangMessage[] | LangMessages, options?: LangOptions): Promise<LangMessages>;
protected transformMessagesForProvider(messages: LangMessages): any[];
private mapPartsToGemini;
private imageInputToGeminiInlineData;
}