mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 06:54:58 +00:00
Update language-inference-engine.js
This commit is contained in:
parent
4c8a127ad3
commit
60a26b3ad0
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user