tiny-ai-api
Version:
A customizable and extensible client api for managing conversations and AI interactions, currently supporting the **Google Gemini** API — with flexibility to support any similar AI APIs.
26 lines (25 loc) • 1.29 kB
text/typescript
/**
* Configures the Tiny AI Api to use the Google Gemini API.
*
* This function sets up the Google Gemini API in a TinyAiApi instance, providing
* the required authentication and model parameters.
*
* @param {TinyAiInstance} tinyGoogleAI - The TinyAiApi instance to be configured.
* @param {string} GEMINI_API_KEY - The API key for Google Gemini.
* @param {string} [MODEL_DATA='gemini-2.0-flash'] - The model to use (default is 'gemini-2.0-flash').
*/
export function setTinyGoogleAi(tinyGoogleAI: TinyAiInstance, GEMINI_API_KEY: string, MODEL_DATA?: string): TinyAiInstance;
import TinyAiInstance from '../base.mjs';
/**
* Creates and configures a new TinyAiInstance that is set up with the Google Gemini API.
*
* @class
* @extends TinyAiInstance
* @param {string} GEMINI_API_KEY - The API key used to authenticate with the Google Gemini API.
* @param {string} [MODEL_DATA='gemini-2.0-flash'] - Optional. The model identifier to use. Defaults to `'gemini-2.0-flash'`.
* @param {boolean} [isSingle=false] - If true, configures the instance to handle a single session only.
* @returns {TinyAiInstance} A configured instance of TinyAiApi.
*/
export class TinyGoogleAi extends TinyAiInstance {
constructor(GEMINI_API_KEY?: string, MODEL_DATA?: string, isSingle?: boolean);
}