XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/gpt4free

Fix issue reading provider model list

5ee34a99
hlohaus <983577+hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +2 -2
Modified g4f/gui/client/static/js/chat.v1.js +2 -2
@@ -2209,7 +2209,7 @@ async function api(ressource, args=null, files=null, message_id=null, scroll=tru
2209 2209 return pywebview.api[`get_${ressource}`]();
2210 2210 }
2211 2211 const headers = {};
2212 const url = new URL(`/backend-api/v2/${ressource}`, window?.location || "http://localhost:8080");
2212 let url = `/backend-api/v2/${ressource}`;
2213 2213 let response;
2214 2214 if (ressource == "models" && args) {
2215 2215 api_key = get_api_key_by_provider(args);
@@ -2220,7 +2220,7 @@ async function api(ressource, args=null, files=null, message_id=null, scroll=tru
2220 2220 if (api_base) {
2221 2221 headers.x_api_base = api_base;
2222 2222 }
2223 ressource = `${ressource}/${args}`;
2223 url = `/backend-api/v2/${ressource}/${args}`;
2224 2224 } else if (ressource == "conversation") {
2225 2225 let body = JSON.stringify(args);
2226 2226 headers.accept = 'text/event-stream';