aiwrapper
Version:
A Universal AI Wrapper for JavaScript & TypeScript
10 lines (9 loc) • 324 B
TypeScript
import { Model } from "aimodels";
import { LangMessage } from "../messages";
/**
* Calculate the maximum number of tokens available for model response
*/
export declare function calculateModelResponseTokens(model: Model, messages: Array<{
role: string;
text: string;
} | LangMessage>, maxTokens?: number): number;