Skip to content

Commit

Permalink
Fix: Add Bearer auth header when fetching ollama models
Browse files Browse the repository at this point in the history
  • Loading branch information
pieonboard committed Jan 22, 2025
1 parent aaf1a60 commit 3a281b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/llm/llms/Ollama.ts
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,10 @@ class Ollama extends BaseLLM {
this.getEndpoint("api/tags"),
{
method: "GET",
headers: {
Authorization: `Bearer ${this.apiKey}`,
"Content-Type": "application/json",
},
},
);
const data = await response.json();
Expand Down

0 comments on commit 3a281b0

Please sign in to comment.