mirror of
				https://github.com/open-webui/pipelines
				synced 2025-06-26 18:15:58 +00:00 
			
		
		
		
	Merge pull request #120 from aschaber1/feature/ollama_manifold_env
feat: Update Ollama manifold pipeline to use environment variable for base URL
This commit is contained in:
		
						commit
						1b3bfe902a
					
				| @ -1,5 +1,7 @@ | ||||
| from typing import List, Union, Generator, Iterator | ||||
| from schemas import OpenAIChatMessage | ||||
| import os | ||||
| 
 | ||||
| from pydantic import BaseModel | ||||
| import requests | ||||
| 
 | ||||
| @ -24,7 +26,11 @@ class Pipeline: | ||||
|         # 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 | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user