fix: Update embedding configuration and fix type errors

- Add configurable embedding provider support
- Remove OpenAI dependency for memory reset
- Add tests for different embedding providers
- Fix type hints and improve docstrings

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2025-02-09 23:25:38 +00:00
parent 409892d65f
commit d56523a01a
4 changed files with 121 additions and 19 deletions

View File

@@ -163,12 +163,3 @@ class RAGStorage(BaseRAGStorage):
raise Exception(
f"An error occurred while resetting the {self.type} memory: {e}"
)
def _create_default_embedding_function(self):
from chromadb.utils.embedding_functions.openai_embedding_function import (
OpenAIEmbeddingFunction,
)
return OpenAIEmbeddingFunction(
api_key=os.getenv("OPENAI_API_KEY"), model_name="text-embedding-3-small"
)