diff --git a/core/llm/llms/Ollama.ts b/core/llm/llms/Ollama.ts index caacf0a6c..8d88c1535 100644 --- a/core/llm/llms/Ollama.ts +++ b/core/llm/llms/Ollama.ts @@ -21,7 +21,7 @@ class Ollama extends BaseLLM { if (options.model === "AUTODETECT") { return; } - this.fetch(`${this.apiBase}/api/show`, { + this.fetch(new URL("api/show", this.apiBase), { method: "POST", headers: {}, body: JSON.stringify({ name: this._getModel() }), @@ -141,7 +141,7 @@ class Ollama extends BaseLLM { prompt: string, options: CompletionOptions, ): AsyncGenerator { - const response = await this.fetch(`${this.apiBase}/api/generate`, { + const response = await this.fetch(new URL("api/generate", this.apiBase), { method: "POST", headers: { "Content-Type": "application/json", @@ -180,7 +180,7 @@ class Ollama extends BaseLLM { messages: ChatMessage[], options: CompletionOptions, ): AsyncGenerator { - const response = await this.fetch(`${this.apiBase}/api/chat`, { + const response = await this.fetch(new URL("api/chat", this.apiBase), { method: "POST", headers: { "Content-Type": "application/json", @@ -218,7 +218,7 @@ class Ollama extends BaseLLM { } async listModels(): Promise { - const response = await this.fetch(`${this.apiBase}/api/tags`, { + const response = await this.fetch(new URL("api/tags", this.apiBase), { method: "GET", }); const data = await response.json(); diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 9a72705eb..8fd6c499b 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.9.82", + "version": "0.9.83", "repository": { "type": "git", "url": "https://github.com/continuedev/continue"