Skip to content

Commit 3df766f

Browse files
committed
fix(api): use dynamic baseUrl instead of hardcoded localhost
Replace hardcoded 'http://127.0.0.1:8080' with dynamic info.baseUrl to support configurable API endpoints. This allows the ModelAPI to work with different base URLs configured in the info object rather than being locked to localhost. 将硬编码的 'http://127.0.0.1:8080' 替换为动态的 info.baseUrl, 以支持可配置的 API 端点。 这使得 ModelAPI 能够使用 info 对象中配置的不同基础 URL, 而不是锁定到本地主机。 Change-Id: I6c29429edc03add8e0440bcfd9f44c27ab015d4b Signed-off-by: OhYee <oyohyee@oyohyee.com>
1 parent b6df38f commit 3df766f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/model/api/model-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class ModelAPI {
2525
const provider = createOpenAICompatible({
2626
name: model || info.model || '',
2727
apiKey: info.apiKey,
28-
baseURL: 'http://127.0.0.1:8080', // info.baseUrl,
28+
baseURL: info.baseUrl || '',
2929
headers: info.headers,
3030
});
3131

0 commit comments

Comments
 (0)