-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
26 lines (21 loc) · 693 Bytes
/
config.py
File metadata and controls
26 lines (21 loc) · 693 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# === config.py ===
def get_llm():
from langchain_ollama import OllamaLLM
return OllamaLLM(model="ollama/mistral:latest", base_url="http://127.0.0.1:11435") # Optimized for CPU
def get_embedder_config():
return {
"provider": "ollama",
"config": {
"model": "nomic-embed-text:latest",
"base_url": "http://127.0.0.1:11435"
}
}
def reset_memory():
import chromadb
client = chromadb.PersistentClient(path=".chroma")
for name in ["short_term", "entities"]:
try:
client.delete_collection(name)
print(f"🧹 Deleted memory collection: {name}")
except Exception:
pass