Skip to content

Commit

Permalink
Merge pull request #120 from aschaber1/feature/ollama_manifold_env
Browse files Browse the repository at this point in the history
feat: Update Ollama manifold pipeline to use environment variable for base URL
  • Loading branch information
tjbck authored Jun 27, 2024
2 parents 8163c34 + 60fa35f commit 1b3bfe9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion examples/pipelines/providers/ollama_manifold_pipeline.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from typing import List, Union, Generator, Iterator
from schemas import OpenAIChatMessage
import os

from pydantic import BaseModel
import requests

Expand All @@ -24,7 +26,11 @@ def __init__(self):
# Optionally, you can set the name of the manifold pipeline.
self.name = "Ollama: "

self.valves = self.Valves(**{"OLLAMA_BASE_URL": "http://localhost:11435"})
self.valves = self.Valves(
**{
"OLLAMA_BASE_URL": os.getenv("OLLAMA_BASE_URL", "http://localhost:11435"),
}
)
self.pipelines = []
pass

Expand Down

0 comments on commit 1b3bfe9

Please sign in to comment.