Skip to content

Commit 3a281b0

Browse files
committed
Fix: Add Bearer auth header when fetching ollama models
1 parent aaf1a60 commit 3a281b0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/llm/llms/Ollama.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,10 @@ class Ollama extends BaseLLM {
509509
this.getEndpoint("api/tags"),
510510
{
511511
method: "GET",
512+
headers: {
513+
Authorization: `Bearer ${this.apiKey}`,
514+
"Content-Type": "application/json",
515+
},
512516
},
513517
);
514518
const data = await response.json();

0 commit comments

Comments
 (0)