modelmix
Version:
🧬 Reliable interface with automatic fallback for AI LLMs.
26 lines (22 loc) • 517 B
JavaScript
import { ModelMix } from '../index.js';
try { process.loadEnvFile(); } catch {}
const mmix = new ModelMix({
config: {
max_history: 1,
debug: false,
bottleneck: {
minTime: 15000,
maxConcurrent: 1
}
},
options: {
max_tokens: 8192,
}
});
mmix.sonnet46({ config: { url: 'fail' } }).gpt41nano();
async function main() {
mmix.addText('hola, como estas?');
const response = await mmix.message();
console.log(response);
}
main();