modelmix 3.3.4 → 3.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/demo/grok.mjs +2 -2
- package/demo/package-lock.json +5 -4
- package/demo/package.json +1 -1
- package/index.js +16 -1
- package/package.json +1 -1
package/demo/grok.mjs
CHANGED
package/demo/package-lock.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^0.20.9",
|
|
13
|
-
"dotenv": "^16.
|
|
13
|
+
"dotenv": "^16.5.0"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
".api/apis/pplx": {
|
|
@@ -102,9 +102,10 @@
|
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
104
|
"node_modules/dotenv": {
|
|
105
|
-
"version": "16.
|
|
106
|
-
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.
|
|
107
|
-
"integrity": "sha512-
|
|
105
|
+
"version": "16.5.0",
|
|
106
|
+
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.5.0.tgz",
|
|
107
|
+
"integrity": "sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==",
|
|
108
|
+
"license": "BSD-2-Clause",
|
|
108
109
|
"engines": {
|
|
109
110
|
"node": ">=12"
|
|
110
111
|
},
|
package/demo/package.json
CHANGED
package/index.js
CHANGED
|
@@ -37,7 +37,7 @@ class ModelMix {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
replace(keyValues) {
|
|
40
|
-
this.config.replace = keyValues;
|
|
40
|
+
this.config.replace = { ...this.config.replace, ...keyValues };
|
|
41
41
|
return this;
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -786,6 +786,21 @@ class MixGrok extends MixOpenAI {
|
|
|
786
786
|
...customConfig
|
|
787
787
|
});
|
|
788
788
|
}
|
|
789
|
+
|
|
790
|
+
processResponse(response) {
|
|
791
|
+
const message = this.extractMessage(response.data);
|
|
792
|
+
|
|
793
|
+
const output = {
|
|
794
|
+
message: message,
|
|
795
|
+
response: response.data
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
if (response.data.choices[0].message.reasoning_content) {
|
|
799
|
+
output.think = response.data.choices[0].message.reasoning_content;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
return output;
|
|
803
|
+
}
|
|
789
804
|
}
|
|
790
805
|
|
|
791
806
|
class MixLMStudio extends MixCustom {
|