update: remove openai
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user