infiniflow / ragflow

RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding.
https://ragflow.io
Apache License 2.0
20.32k stars 2.01k forks source link

[Question]: Maximum loop time exceeds. Can't find relevant information. #1697

Open water-2022 opened 3 months ago

water-2022 commented 3 months ago

Describe your problem

root@fce13cef52ca:/ragflow# PYTHONPATH=/ragflow python3 graph/test/client.py -t f4c90d7e2c5711efbe730242ac160006 -s graph/test/dsl_examples/headhunter_zh.json
[WARNING] Load term.freq FAIL!
[WARNING] [2024-07-25 10:55:08,126] [synonym.__init__] [line:40]: Realtime synonym is disabled, since no redis connection.
Traceback (most recent call last):
  File "/ragflow/graph/test/client.py", line 37, in <module>
    ans = canvas.run(stream=args.stream)
  File "/ragflow/graph/canvas.py", line 238, in run
    ans = self.components[cpn_id]["obj"].run(self.history, **kwargs)
  File "/ragflow/graph/component/base.py", line 407, in run
    raise e
  File "/ragflow/graph/component/base.py", line 403, in run
    res = self._run(history, **kwargs)
  File "/ragflow/graph/component/answer.py", line 45, in _run
    ans = self.get_input()
  File "/ragflow/graph/component/base.py", line 463, in get_input
    return pd.concat(upstream_outs, ignore_index=False)
  File "/usr/local/lib/python3.10/dist-packages/pandas/core/reshape/concat.py", line 382, in concat
    op = _Concatenator(
  File "/usr/local/lib/python3.10/dist-packages/pandas/core/reshape/concat.py", line 445, in __init__
    objs, keys = self._clean_keys_and_objs(objs, keys)
  File "/usr/local/lib/python3.10/dist-packages/pandas/core/reshape/concat.py", line 507, in _clean_keys_and_objs
    raise ValueError("No objects to concatenate")
ValueError: No objects to concatenate

I don't know why. I don't know what to do.

Thank you for your reply.

KevinHuSh commented 3 months ago

Please upgrade the ragflow to dev version of image and pull the latest code.

water-2022 commented 3 months ago

@KevinHuSh new issue.

root@f781ec8ae537:/ragflow# PYTHONPATH=/ragflow python3 graph/test/client.py -t f4c90d7e2c5711efbe730242ac160006 -s graph/test/dsl_examples/headhunter_zh.json
[WARNING] Load term.freq FAIL!
[WARNING] [2024-07-25 03:49:16,323] [synonym.__init__] [line:40]: Realtime synonym is disabled, since no redis connection.
==================== Bot =====================
>    Traceback (most recent call last):
  File "/ragflow/graph/test/client.py", line 45, in <module>
    print(ans["content"])
  File "/usr/local/lib/python3.10/dist-packages/pandas/core/frame.py", line 4090, in __getitem__
    indexer = self.columns.get_loc(key)
  File "/usr/local/lib/python3.10/dist-packages/pandas/core/indexes/range.py", line 417, in get_loc
    raise KeyError(key)
KeyError: 'content'
root@f781ec8ae537:/ragflow# PYTHONPATH=/ragflow python3 graph/test/client.py -t f4c90d7e2c5711efbe730242ac160006 -s graph/test/dsl_examples/headhunter_zh.json -m
[WARNING] Load term.freq FAIL!
[WARNING] [2024-07-25 05:53:44,676] [synonym.__init__] [line:40]: Realtime synonym is disabled, since no redis connection.
==================== Bot =====================
>    您好!我是AGI方向的猎头,了解到您是这方面的大佬,然后冒昧的就联系到您。这边有个机会想和您分享,RAGFlow正在招聘您这个岗位的资深的工程师不知道您那边是不是感兴趣?
==================== User =====================
> 你好,请问招聘要求是什么?
Traceback (most recent call last):
  File "/ragflow/graph/test/client.py", line 37, in <module>
    ans = canvas.run(stream=args.stream)
  File "/ragflow/graph/canvas.py", line 205, in run
    prepare2run(self.components[self.path[-2][-1]]["downstream"])
  File "/ragflow/graph/canvas.py", line 201, in prepare2run
    ans = cpn.run(self.history, **kwargs)
  File "/ragflow/graph/component/base.py", line 407, in run
    raise e
  File "/ragflow/graph/component/base.py", line 403, in run
    res = self._run(history, **kwargs)
  File "/ragflow/graph/component/categorize.py", line 80, in _run
    chat_mdl = LLMBundle(self._canvas.get_tenant_id(), LLMType.CHAT, self._param.llm_id)
  File "/ragflow/api/db/services/llm_service.py", line 177, in __init__
    self.mdl = TenantLLMService.model_instance(
  File "/usr/local/lib/python3.10/dist-packages/peewee.py", line 3128, in inner
    return fn(*args, **kwargs)
  File "/ragflow/api/db/services/llm_service.py", line 95, in model_instance
    raise LookupError("Model({}) not authorized".format(mdlnm))
LookupError: Model(deepseek-chat) not authorized
root@f781ec8ae537:/ragflow# PYTHONPATH=/ragflow python3 graph/test/client.py -t f4c90d7e2c5711efbe730242ac160006 -s graph/test/dsl_examples/headhunter_zh.json -m
[WARNING] Load term.freq FAIL!
[WARNING] [2024-07-25 06:04:07,125] [synonym.__init__] [line:40]: Realtime synonym is disabled, since no redis connection.
==================== Bot =====================
>    您好!我是AGI方向的猎头,了解到您是这方面的大佬,然后冒昧的就联系到您。这边有个机会想和您分享,RAGFlow正在招聘您这个岗位的资深的工程师不知道您那边是不是感兴趣?
==================== User =====================
> 你好,非常感兴趣,请问招聘要求是什么?
Traceback (most recent call last):
  File "/ragflow/graph/canvas.py", line 220, in run
    prepare2run([switch_out])
  File "/ragflow/graph/canvas.py", line 201, in prepare2run
    ans = cpn.run(self.history, **kwargs)
  File "/ragflow/graph/component/base.py", line 407, in run
    raise e
  File "/ragflow/graph/component/base.py", line 403, in run
    res = self._run(history, **kwargs)
  File "/ragflow/graph/component/retrieval.py", line 61, in _run
    raise ValueError("Can't find knowledgebases by {}".format(self._param.kb_ids))
ValueError: Can't find knowledgebases by ['869a236818b811ef91dffa163e197198']
==================== Bot =====================
>    Can't find knowledgebases by ['869a236818b811ef91dffa163e197198']
==================== User =====================
>
KevinHuSh commented 3 months ago

You need to set a valid kb_id in dsl based on your local system.

water-2022 commented 2 months ago

@KevinHuSh

Q1: sequence item 0: expected str instance, dict found.

企业微信截图_17219601291220

Q2: The result is unsatisfactory, and I have not received the email.

企业微信截图_1721960569109 企业微信截图_17219605868343

Q3: Maximum loop time exceeds. Can't find relevant information. OverflowError('Too much loops: retrieval => rewrite => relevant => retrieval => rewrite => relevant')