Skip to content

Commit 1b46a3b

Browse files
committed
fix: bugname with suffixes
1 parent f1fb91f commit 1b46a3b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

agentic_rag/local_rag_agent.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ def __init__(self, model_name: str):
5757
Args:
5858
model_name: Name of the Ollama model to use
5959
"""
60+
# Remove 'ollama:' prefix if present
61+
if model_name and model_name.startswith("ollama:"):
62+
model_name = model_name.replace("ollama:", "")
63+
6064
self.model_name = model_name
6165
self._check_ollama_running()
6266

@@ -170,6 +174,10 @@ def __init__(self, vector_store: VectorStore = None, model_name: str = None,
170174
self.is_ollama = not (model_name and "mistral" in model_name.lower())
171175

172176
if self.is_ollama:
177+
# Remove 'ollama:' prefix if present
178+
if model_name and model_name.startswith("ollama:"):
179+
model_name = model_name.replace("ollama:", "")
180+
173181
# Load Ollama model
174182
print("\nLoading Ollama model...")
175183
print(f"Model: {model_name}")

0 commit comments

Comments
 (0)