main works, cli bugs

This commit is contained in:
Edward Sun
2025-06-15 22:20:59 -07:00
parent 90b23e72f5
commit da84ef43aa
11 changed files with 5577 additions and 50 deletions

View File

@@ -5,11 +5,11 @@ from openai import OpenAI
class FinancialSituationMemory:
def __init__(self, name, config):
if config["openai_backend"] == "http://localhost:11434/v1":
if config["backend_url"] == "http://localhost:11434/v1":
self.embedding = "nomic-embed-text"
else:
self.embedding = "text-embedding-ada-002"
self.client = OpenAI(base_url=config["openai_backend"])
self.embedding = "text-embedding-3-small"
self.client = OpenAI()
self.chroma_client = chromadb.Client(Settings(allow_reset=True))
self.situation_collection = self.chroma_client.create_collection(name=name)