diff --git a/lib/language-inference-engine.js b/lib/language-inference-engine.js index 6d01a11..7569006 100644 --- a/lib/language-inference-engine.js +++ b/lib/language-inference-engine.js @@ -21,6 +21,7 @@ var biasMessage = "Write all future code examples in JavaScript ES3 using the ex var engineProfiles = { "openai": { + "type": "llm", "defaultModel": "gpt-4o-mini", "headers": { "Content-Type": "application/json", @@ -53,6 +54,7 @@ var engineProfiles = { } }, "anthropic": { + "type": "llm", "defaultModel": "claude-3-5-sonnet-20241022", "headers": { "Content-Type": "application/json", @@ -94,6 +96,7 @@ var engineProfiles = { } }, "groq": { + "type": "llm", "defaultModel": "llama-3.1-8b-instant", "headers": { "Content-Type": "application/json", @@ -129,6 +132,7 @@ var engineProfiles = { } }, "xai": { + "type": "llm", "defaultModel": "grok-2-latest", "headers": { "Content-Type": "application/json", @@ -160,6 +164,7 @@ var engineProfiles = { } }, "google": { + "type": "llm", "defaultModel": "gemini-1.5-flash", "headers": { "Content-Type": "application/json", @@ -198,6 +203,7 @@ var engineProfiles = { } }, "deepseek": { + "type": "llm", "defaultModel": "deepseek-chat", "headers": { "Content-Type": "application/json", @@ -234,16 +240,16 @@ var engineProfiles = { }; function LanguageInferenceEngine() { - this.type = "llm"; // e.g. legacy (Legacy NLP), llm (LLM) + this.type = ""; // e.g. legacy (Legacy NLP), llm (LLM) this.provider = ""; this.model = ""; this.engineProfile = null; this.setProvider = function(provider) { this.provider = provider; - - if (provider in engineProfiles) { + if (this.provider in engineProfiles) { this.engineProfile = engineProfiles[provider]; + this.type = this.engineProfile.type; this.model = this.engineProfile.defaultModel; }