@nomyx/assistant
Version:
A powerful assistant library and cli for your AI projects. works with Vertex AI (Claude and Gemini)
37 lines (32 loc) • 944 B
text/typescript
export interface ModelConfig {
maxTokens: number;
supportsTools: boolean;
}
export const OPENROUTER_MODEL_CONFIG: Record<string, ModelConfig> = {
'nousresearch/hermes-3-llama-3.1-405b:free': {
maxTokens: 13072,
supportsTools: false,
},
'google/gemini-pro-1.5-exp': {
maxTokens: 1000000,
supportsTools: true,
},
'meta-llama/llama-3.1-405b-instruct:free': {
maxTokens: 13072,
supportsTools: false,
},
'liquid/lfm-40b': {
maxTokens: 32768,
supportsTools: false,
},
};
export const DEFAULT_OPENROUTER_MODEL = 'openai/gpt-3.5-turbo';
export function getModelConfig(model: string): ModelConfig {
return OPENROUTER_MODEL_CONFIG[model] || OPENROUTER_MODEL_CONFIG[DEFAULT_OPENROUTER_MODEL];
}
export function getMaxTokens(model: string): number {
return getModelConfig(model).maxTokens;
}
export function supportsTools(model: string): boolean {
return getModelConfig(model).supportsTools;
}