From 9933d8f880e8283f8e065bf1d1dbada3b3c3bf3b Mon Sep 17 00:00:00 2001 From: Brandon Hancock Date: Fri, 1 Nov 2024 10:43:47 -0400 Subject: [PATCH] Update docs as well. --- docs/concepts/memory.mdx | 25 ++++++++++++++++++++++++ src/crewai/memory/storage/rag_storage.py | 2 -- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/docs/concepts/memory.mdx b/docs/concepts/memory.mdx index 735ed861e..bda9f3401 100644 --- a/docs/concepts/memory.mdx +++ b/docs/concepts/memory.mdx @@ -254,6 +254,31 @@ my_crew = Crew( ) ``` +### Using Watson embeddings + +```python Code +from crewai import Crew, Agent, Task, Process + +# Note: Ensure you have installed and imported `ibm_watsonx_ai` for Watson embeddings to work. + +my_crew = Crew( + agents=[...], + tasks=[...], + process=Process.sequential, + memory=True, + verbose=True, + embedder={ + "provider": "watson", + "config": { + "model": "", + "api_url": "", + "api_key": "", + "project_id": "", + } + } +) +``` + ### Resetting Memory ```shell diff --git a/src/crewai/memory/storage/rag_storage.py b/src/crewai/memory/storage/rag_storage.py index 67e8ef515..f07c7e4f7 100644 --- a/src/crewai/memory/storage/rag_storage.py +++ b/src/crewai/memory/storage/rag_storage.py @@ -116,8 +116,6 @@ class RAGStorage(BaseRAGStorage): url=config.get("api_url"), ) elif provider == "watson": - - # https://ibm.github.io/watsonx-ai-python-sdk/fm_embeddings.html try: import ibm_watsonx_ai.foundation_models as watson_models from ibm_watsonx_ai import Credentials