langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
48.83k stars 7k forks source link

Error retreiving knowledge #9675

Open damadorPL opened 4 hours ago

damadorPL commented 4 hours ago

Self Checks

Dify version

0.10.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

crwal any url with firefrawl/jina

text-embedding-ada-002 jina-reranker-v2-base-multilingual

but it fail with any combination

add it to completition and test

api return

2024-10-22 18:53:48,170.170 ERROR [Thread-3 (_generate_worker)] [app_generator.py:210] - Unknown Error when generating Traceback (most recent call last): File "/app/api/core/app/apps/completion/app_generator.py", line 191, in _generate_worker runner.run( File "/app/api/core/app/apps/completion/app_runner.py", line 119, in run context = dataset_retrieval.retrieve( File "/app/api/core/rag/retrieval/dataset_retrieval.py", line 122, in retrieve all_documents = self.single_retrieve( File "/app/api/core/rag/retrieval/dataset_retrieval.py", line 330, in single_retrieve results = RetrievalService.retrieve( File "/app/api/core/rag/datasource/retrieval_service.py", line 104, in retrieve raise Exception(exception_message) Exception: 'NoneType' object has no attribute 'replace'; 'NoneType' object has no attribute 'replace' 2024-10-22 18:53:48,180.180 ERROR [Dummy-2] [base_app_generate_response_converter.py:131] - 'NoneType' object has no attribute 'replace'; 'NoneType' object has no attribute 'replace'

✔️ Expected Behavior

working generation

❌ Actual Behavior

no generation and error in api

dosubot[bot] commented 4 hours ago

I found some similar issues that might be relevant to the error you're encountering:

  1. ERROR: '<' not supported between instances of 'NoneType' and 'NoneType' - This issue was resolved by upgrading to version 0.10.0, which you are already using.

  2. Failed to invoke tool: 'NoneType' object has no attribute 'items' - The suggested solutions for this issue include:

    • Ensuring that tool parameters are correctly formatted as a dictionary and that the timezone provided is valid.
    • Verifying and updating environment variables and configurations in your Docker setup, then restarting your Docker containers.
    • Considering using a different or smarter model, as switching to a higher quality model resolved the issue for another user.

The error message you're seeing suggests that there might be a None value where a string is expected, specifically related to the replace method. Ensure that all required parameters are provided and correctly formatted. If the issue persists, you might want to check the implementation of the retrieve method in the retrieval_service.py file to ensure that the inputs to this method are valid and correctly formatted [1].

To continue talking to Dosu, mention @dosu.