modelmix 3.3.6 → 3.4.0
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/README.md +2 -1
- package/demo/grok.mjs +2 -2
- package/demo/package-lock.json +5 -4
- package/demo/package.json +1 -1
- package/index.js +16 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -117,7 +117,7 @@ Here's a comprehensive list of available methods:
|
|
|
117
117
|
| `grok3mini()` | Grok | grok-3-mini-beta | [\$0.30 / \$0.50][6] |
|
|
118
118
|
| `sonar()` | Perplexity | sonar | [\$1.00 / \$1.00][4] |
|
|
119
119
|
| `sonarPro()` | Perplexity | sonar-pro | [\$3.00 / \$15.00][4] |
|
|
120
|
-
| `qwen3()` |
|
|
120
|
+
| `qwen3()` | Together | Qwen3-235B-A22B-fp8-tput | [\$0.20 / \$0.60][7] |
|
|
121
121
|
| `scout()` | Groq | Llama-4-Scout-17B-16E-Instruct | [\$0.11 / \$0.34][5] |
|
|
122
122
|
| `maverick()` | Groq | Maverick-17B-128E-Instruct-FP8 | [\$0.20 / \$0.60][5] |
|
|
123
123
|
|
|
@@ -127,6 +127,7 @@ Here's a comprehensive list of available methods:
|
|
|
127
127
|
[4]: https://docs.perplexity.ai/guides/pricing "Pricing - Perplexity"
|
|
128
128
|
[5]: https://groq.com/pricing/ "Groq Pricing"
|
|
129
129
|
[6]: https://docs.x.ai/docs/models "xAI"
|
|
130
|
+
[7]: https://www.together.ai/pricing "Together AI"
|
|
130
131
|
|
|
131
132
|
Each method accepts optional `options` and `config` parameters to customize the model's behavior. For example:
|
|
132
133
|
|
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
|
@@ -129,8 +129,7 @@ class ModelMix {
|
|
|
129
129
|
return this.attach('grok-3-mini-beta', new MixGrok({ options, config }));
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
qwen3({ options = {}, config = {}, mix = {
|
|
133
|
-
if (mix.groq) this.attach('qwen-qwq-32b', new MixGroq({ options, config }));
|
|
132
|
+
qwen3({ options = {}, config = {}, mix = { together: true } } = {}) {
|
|
134
133
|
if (mix.together) this.attach('Qwen/Qwen3-235B-A22B-fp8-tput', new MixTogether({ options, config }));
|
|
135
134
|
return this;
|
|
136
135
|
}
|
|
@@ -786,6 +785,21 @@ class MixGrok extends MixOpenAI {
|
|
|
786
785
|
...customConfig
|
|
787
786
|
});
|
|
788
787
|
}
|
|
788
|
+
|
|
789
|
+
processResponse(response) {
|
|
790
|
+
const message = this.extractMessage(response.data);
|
|
791
|
+
|
|
792
|
+
const output = {
|
|
793
|
+
message: message,
|
|
794
|
+
response: response.data
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
if (response.data.choices[0].message.reasoning_content) {
|
|
798
|
+
output.think = response.data.choices[0].message.reasoning_content;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
return output;
|
|
802
|
+
}
|
|
789
803
|
}
|
|
790
804
|
|
|
791
805
|
class MixLMStudio extends MixCustom {
|