Update OpenAI.ts
This commit is contained in:
parent
7b6d80a621
commit
acf832aab2
1 changed files with 1 additions and 2 deletions
|
|
@ -288,8 +288,7 @@ class OpenAI extends BaseLLM {
|
|||
suffix: string,
|
||||
options: CompletionOptions,
|
||||
): AsyncGenerator<string> {
|
||||
const url = this.apiBase?.includes("api.siliconflow.cn") ? "completions" : "fim/completions"
|
||||
const endpoint = new URL(url, this.apiBase);
|
||||
const endpoint = this.apiBase?.includes("completions") ? new URL(this.apiBase) : new URL("fim/completions", this.apiBase);
|
||||
const resp = await this.fetch(endpoint, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue