Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Getting error when using the knowledge and embedder configuration : watsonx #1764

Open
paarttipaabhalaji opened this issue Dec 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@paarttipaabhalaji
Copy link

Description

I am using PDFKnowledge base
crew :

@crew
     def PlantUMLGenCrew(self) -> Crew:
         """Creates the Plantumlgenerator crew"""
         # To learn how to add knowledge sources to your crew, check out the documentation:
         # https://docs.crewai.comconcepts/knowledge#what-is-knowledge

         return Crew(
             agents=self.agents, # Automatically created by the @agent decorator
             tasks=self.tasks, # Automatically created by the @task decorator
             process=Process.sequential,
             knowledge_sources=[PlantUML_SqeuenceDiagram_KG_Source],
             embedder={
                 "provider": "watson",
                 "config": {"model": "ibm/slate-125m-english-rtrvr"},
             },
             full_output=True,
             verbose=True,
             # process=Process.hierarchical, # In case you wanna use that instead https://docs.crewai.com/how-to/Hierarchical/
         )

Error:

```

(javadesigndocgen) paarttipaa@Paarttipaabhalajis-MacBook-Pro javadesigndocgen % crewai flow kickoff
Running the Flow
Traceback (most recent call last):
File "/Users/paarttipaa/ProjectTask/GithubProj/crewaiInteg_slc_code_explanation_project/step02_crewai/javadesigndocgen/.venv/bin/kickoff", line 7, in
from javadesigndocgen.main import kickoff
File "/Users/paarttipaa/ProjectTask/GithubProj/crewaiInteg_slc_code_explanation_project/step02_crewai/javadesigndocgen/src/javadesigndocgen/main.py", line 16, in
from .crews.plantumlgenerator.src.plantumlgenerator.crew import Plantumlgenerator
File "/Users/paarttipaa/ProjectTask/GithubProj/crewaiInteg_slc_code_explanation_project/step02_crewai/javadesigndocgen/src/javadesigndocgen/crews/plantumlgenerator/src/plantumlgenerator/crew.py", line 11, in
from langchain_ibm.embeddings import WatsonxEmbeddings
File "/Users/paarttipaa/ProjectTask/GithubProj/crewaiInteg_slc_code_explanation_project/step02_crewai/javadesigndocgen/.venv/lib/python3.12/site-packages/langchain_ibm/init.py", line 1, in
from langchain_ibm.chat_models import ChatWatsonx
File "/Users/paarttipaa/ProjectTask/GithubProj/crewaiInteg_slc_code_explanation_project/step02_crewai/javadesigndocgen/.venv/lib/python3.12/site-packages/langchain_ibm/chat_models.py", line 24, in
from ibm_watsonx_ai import APIClient, Credentials # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/paarttipaa/ProjectTask/GithubProj/crewaiInteg_slc_code_explanation_project/step02_crewai/javadesigndocgen/.venv/lib/python3.12/site-packages/ibm_watsonx_ai/init.py", line 19, in
from ibm_watsonx_ai.client import APIClient
File "/Users/paarttipaa/ProjectTask/GithubProj/crewaiInteg_slc_code_explanation_project/step02_crewai/javadesigndocgen/.venv/lib/python3.12/site-packages/ibm_watsonx_ai/client.py", line 29, in
from ibm_watsonx_ai.deployments import Deployments
File "/Users/paarttipaa/ProjectTask/GithubProj/crewaiInteg_slc_code_explanation_project/step02_crewai/javadesigndocgen/.venv/lib/python3.12/site-packages/ibm_watsonx_ai/deployments.py", line 44, in
from ibm_watsonx_ai.utils.autoai.utils import all_logging_disabled
File "/Users/paarttipaa/ProjectTask/GithubProj/crewaiInteg_slc_code_explanation_project/step02_crewai/javadesigndocgen/.venv/lib/python3.12/site-packages/ibm_watsonx_ai/utils/autoai/utils.py", line 71, in
import pandas as pd
File "/Users/paarttipaa/ProjectTask/GithubProj/crewaiInteg_slc_code_explanation_project/step02_crewai/javadesigndocgen/.venv/lib/python3.12/site-packages/pandas/init.py", line 46, in
from pandas.core.api import (
File "/Users/paarttipaa/ProjectTask/GithubProj/crewaiInteg_slc_code_explanation_project/step02_crewai/javadesigndocgen/.venv/lib/python3.12/site-packages/pandas/core/api.py", line 1, in
from pandas._libs import (
File "/Users/paarttipaa/ProjectTask/GithubProj/crewaiInteg_slc_code_explanation_project/step02_crewai/javadesigndocgen/.venv/lib/python3.12/site-packages/pandas/_libs/init.py", line 18, in
from pandas._libs.interval import Interval
File "interval.pyx", line 1, in init pandas._libs.interval
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
An error occurred while running the flow: Command '['uv', 'run', 'kickoff']' returned non-zero exit status 1.


### Steps to Reproduce

1. Create a PDF Knowledge source
2. In the crew you need to use the embedding model from "Watsonx"

Note: Only watsonx embedding model is need to configure. 

### Expected behavior

when you use the embedding model from watsonx, it should nor throw any like 

ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
An error occurred while running the flow: Command '['uv', 'run', 'kickoff']' returned non-zero exit status 1.


Crewai should accept the embedding model from watsonx and trigger the process smoothly.

### Screenshots/Code snippets

https://community.crewai.com/t/getting-error-when-using-the-knowledge-and-embedder-configuration/2065

### Operating System

macOS Sonoma

### Python Version

3.12

### crewAI Version

crewai[tools]>=0.86.0,<1.0.0

### crewAI Tools Version

crewai-tools==0.17.0

### Virtual Environment

Venv

### Evidence

https://community.crewai.com/t/getting-error-when-using-the-knowledge-and-embedder-configuration/2065

### Possible Solution

1. Resolve the package version compatibility and dependencies issues.
2. Redirect the process to its respective embedding model provider, what configures in the @ crew 

### Additional context

https://community.crewai.com/t/getting-error-when-using-the-knowledge-and-embedder-configuration/2065

Actually I am working on client pilot, I can’t implement this feature. its a tight deadline. kindly Fix it as soon as possible. I’m waiting for the fix.
@paarttipaabhalaji paarttipaabhalaji added the bug Something isn't working label Dec 16, 2024
@paarttipaabhalaji
Copy link
Author

Hi Team,
Any update on this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant