From 9c595ed69ac8053b17fb55a51d39fe078d5932cb Mon Sep 17 00:00:00 2001 From: Sweaterdog Date: Tue, 4 Mar 2025 16:51:32 -0800 Subject: [PATCH] Update prompter.js Fixed the hyperbolic and glhf.chat setup, for some reason it was deleted when merging with the main. --- src/models/prompter.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/models/prompter.js b/src/models/prompter.js index 5f56da5..7d4353f 100644 --- a/src/models/prompter.js +++ b/src/models/prompter.js @@ -18,8 +18,8 @@ import { HuggingFace } from './huggingface.js'; import { Qwen } from "./qwen.js"; import { Grok } from "./grok.js"; import { DeepSeek } from './deepseek.js'; -import { hyperbolic } from './hyperbolic.js'; -import { glhf } from './glhf.js'; +import { Hyperbolic } from './hyperbolic.js'; +import { GLHF } from './glhf.js'; import { OpenRouter } from './openrouter.js'; export class Prompter { @@ -140,6 +140,10 @@ export class Prompter { model_profile.api = 'mistral'; else if (profile.model.includes("groq/") || profile.model.includes("groqcloud/")) profile.api = 'groq'; + else if (profile.model.includes("GLHF/") + profile.api = 'glhf'; + else if (profile.model.includes("Hyperbolic/") + profile.api = 'hyperbolic'; else if (profile.model.includes('novita/')) profile.api = 'novita'; else if (profile.model.includes('qwen')) @@ -149,7 +153,7 @@ export class Prompter { else if (profile.model.includes('deepseek')) profile.api = 'deepseek'; else - profile.api = 'ollama'; // Assume the model is ollama, even if the user didn't use ollama/ + throw new Error('Unknown model:', profile.model, 'Did you check the name is correct?'); // Asks the user if the name is correct } return profile; } @@ -171,6 +175,10 @@ export class Prompter { model = new GroqCloudAPI(profile.model.replace('groq/', '').replace('groqcloud/', ''), profile.url, profile.params); else if (profile.api === 'huggingface') model = new HuggingFace(profile.model, profile.url, profile.params); + else if (profile.api === 'glhf') + model = new GLHF(profile.model.replace('glhf/', ''), profile.url, profile.params); + else if (profile.api === 'hyperbolic') + model = new Hyperbolic(profile.model.replace('hyperbolic/', ''), profile.url, profile.params); else if (profile.api === 'novita') model = new Novita(profile.model.replace('novita/', ''), profile.url, profile.params); else if (profile.api === 'qwen')