agent-mp 0.4.9 → 0.4.10
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/dist/utils/qwen-auth.js +2 -4
- package/package.json +1 -1
package/dist/utils/qwen-auth.js
CHANGED
|
@@ -235,8 +235,7 @@ export async function fetchQwenModels() {
|
|
|
235
235
|
if (!token)
|
|
236
236
|
return [];
|
|
237
237
|
try {
|
|
238
|
-
const
|
|
239
|
-
const res = await fetch(`${host}/api/models`, {
|
|
238
|
+
const res = await fetch('https://chat.qwen.ai/api/models', {
|
|
240
239
|
headers: { Authorization: `Bearer ${token.accessToken}` },
|
|
241
240
|
});
|
|
242
241
|
if (!res.ok)
|
|
@@ -253,8 +252,7 @@ export async function getQwenAccessToken() {
|
|
|
253
252
|
return token?.accessToken || null;
|
|
254
253
|
}
|
|
255
254
|
async function callQwenAPIWithToken(token, prompt, model, onData) {
|
|
256
|
-
const
|
|
257
|
-
const baseUrl = `${host}/api/v1`;
|
|
255
|
+
const baseUrl = 'https://chat.qwen.ai/api/v1';
|
|
258
256
|
const useStream = !!onData;
|
|
259
257
|
const response = await fetch(`${baseUrl}/chat/completions`, {
|
|
260
258
|
method: 'POST',
|