From 60a26b3ad0b02e646141364e90cd1862c0dedd0b Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Thu, 30 Jan 2025 18:59:04 +0900 Subject: [PATCH] Update language-inference-engine.js --- lib/language-inference-engine.js | 42 +++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/lib/language-inference-engine.js b/lib/language-inference-engine.js index b8c72cd..bed16ad 100644 --- a/lib/language-inference-engine.js +++ b/lib/language-inference-engine.js @@ -24,7 +24,9 @@ var BIAS_MESSAGE = "Write all future code examples in JavaScript ES3 using the e var ENGINE_PROFILES = { "openai": { "type": "llm", - "defaultModel": "gpt-4o-mini", + "availableModels": [ + "gpt-4o-mini" + ], "headers": { "Content-Type": "application/json", "Authorization": "Bearer {apikey}" @@ -58,7 +60,9 @@ var ENGINE_PROFILES = { }, "anthropic": { "type": "llm", - "defaultModel": "claude-3-5-sonnet-20241022", + "availableModels": [ + "claude-3-5-sonnet-20241022" + ], "headers": { "Content-Type": "application/json", "x-api-key": "{apikey}", @@ -100,7 +104,9 @@ var ENGINE_PROFILES = { }, "groq": { "type": "llm", - "defaultModel": "llama-3.1-8b-instant", + "availableModels": [ + "llama-3.1-8b-instant" + ], "headers": { "Content-Type": "application/json", "Authorization": "Bearer {apikey}" @@ -137,7 +143,9 @@ var ENGINE_PROFILES = { }, "xai": { "type": "llm", - "defaultModel": "grok-2-latest", + "availableModels": [ + "grok-2-latest" + ], "headers": { "Content-Type": "application/json", "Authorization": "Bearer {apikey}" @@ -170,7 +178,9 @@ var ENGINE_PROFILES = { }, "google": { "type": "llm", - "defaultModel": "gemini-1.5-flash", + "availableModels": [ + "gemini-1.5-flash" + ], "headers": { "Content-Type": "application/json", "Authorization": "Bearer {apikey}" @@ -209,7 +219,9 @@ var ENGINE_PROFILES = { }, "mistral": { "type": "llm", - "defaultModel": "ministral-8b-latest", + "availableModels": [ + "ministral-8b-latest" + ], "url": "https://api.mistral.ai/v1/chat/completions", "wrap": function(model, message, temperature) { "model": model, @@ -240,7 +252,9 @@ var ENGINE_PROFILES = { }, "deepseek": { "type": "llm", - "defaultModel": "deepseek-chat", + "availableModels": [ + "deepseek-chat" + ], "headers": { "Content-Type": "application/json", "Authorization": "Bearer {apikey}" @@ -275,7 +289,9 @@ var ENGINE_PROFILES = { }, "moonshot": { "type": "llm", - "defaultModel": "moonshot-v1-8k", + "availableModels": [ + "moonshot-v1-8k" + ], "headers": { "Content-Type": "application/json", "Authorization": "Bearer {apikey}" @@ -310,7 +326,11 @@ var ENGINE_PROFILES = { }, "catswords": { "type": "llm", - "defaultModel": "openchat-3.5-0106", + "availableModels": [ + "openchat-3.5-0106", + "qwen1.5-14b-chat-awq", + "gemma-7b-it" + ], "headers": { "Content-Type": "application/json", "Authorization": "Bearer {apikey}" @@ -356,7 +376,7 @@ function LanguageInferenceEngine() { if (this.provider in ENGINE_PROFILES) { this.engineProfile = ENGINE_PROFILES[provider]; this.type = this.engineProfile.type; - this.model = this.engineProfile.defaultModel; + this.model = this.engineProfile.availableModels[0]; } return this; @@ -410,7 +430,7 @@ exports.create = function() { return new LanguageInferenceEngine(); }; -exports.VERSIONINFO = "Language Inference Engine integration version 0.1.5"; +exports.VERSIONINFO = "Language Inference Engine integration version 0.1.6"; exports.AUTHOR = "abuse@catswords.net"; exports.global = global; exports.require = global.require;