Create dropdown box to select which model to use in the GUI on startup

This commit is contained in:
2024-03-09 05:43:40 -05:00
parent e5419b0108
commit 437831aea5
6 changed files with 54 additions and 9 deletions

View File

@@ -36,7 +36,8 @@ class KuzcoCore {
return fs.existsSync(this.configPath) && this.API_KEY !== '';
}
async sendPrompt(prompt) {
async sendPrompt(prompt, model) {
console.log("Model received in sendPrompt:", model)
try {
const response = await fetch('https://relay.kuzco.xyz/v1/chat/completions', {
method: 'POST',
@@ -46,7 +47,7 @@ class KuzcoCore {
},
body: JSON.stringify({
messages: [{ role: 'user', 'content': prompt + '\n' }],
model: 'mistral',
model: model,
stream: false,
}),
});