update: remove openai

This commit is contained in:
2025-11-24 04:26:57 +08:00
parent bd5fa00022
commit 6d473a0902
10 changed files with 370 additions and 256 deletions

View File

@@ -37,11 +37,11 @@ export class Ollama extends BaseChat {
async listModels(): Promise<{ models: OllamaModel[] }> {
const _url = new URL(this.baseURL);
const tagsURL = new URL('/api/tags', _url);
return this.openai.get(tagsURL.toString());
return this.get(tagsURL.toString());
}
async listRunModels(): Promise<{ models: OllamaModel[] }> {
const _url = new URL(this.baseURL);
const tagsURL = new URL('/api/ps', _url);
return this.openai.get(tagsURL.toString());
return this.get(tagsURL.toString());
}
}

View File

@@ -31,7 +31,7 @@ export class SiliconFlow extends BaseChat {
super({ ...(options as BaseChatOptions), baseURL: baseURL });
}
async getUsageInfo(): Promise<SiliconFlowUsageResponse> {
return this.openai.get('/user/info');
return this.get('/user/info');
}
async chat(messages: OpenAI.Chat.Completions.ChatCompletionMessageParam[], options?: ChatMessageOptions) {
const res = await super.chat(messages, options);