working scraper workflow using remote ollama
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
"""Shared pipeline configuration helpers."""
|
||||
|
||||
import os
|
||||
|
||||
_OLLAMA_DEFAULT = "http://127.0.0.1:11434/api/generate"
|
||||
_OLLAMA_PATH = "/api/generate"
|
||||
|
||||
|
||||
def resolve_ollama_url(raw: str) -> str:
|
||||
"""Ensure the Ollama URL always ends with the API path."""
|
||||
if raw.endswith(_OLLAMA_PATH):
|
||||
return raw
|
||||
return raw.rstrip("/") + _OLLAMA_PATH
|
||||
Reference in New Issue
Block a user