Fix: Add Bearer auth header when fetching ollama models

This commit is contained in:
Pavel Smagin 2025-01-22 12:54:20 +01:00
parent e932dba75c
commit 4fd02daad5

View file

@ -509,6 +509,10 @@ class Ollama extends BaseLLM {
this.getEndpoint("api/tags"),
{
method: "GET",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${this.apiKey}`,
},
},
);
const data = await response.json();