codefuse-ai/codefuse-chatbot

FileNotFoundError: [Errno 2] No such file or directory: '/hermes_graph.json'

Closed this issue · 3 comments

Checked other resources

  • I searched the Codefuse documentation with the integrated search.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in Codefuse-Repos rather than my code.
  • I added a very descriptive title to this issue.

System Info

MacOS

Code Version

Master (branch)

Description

使用代码知识库问答聊天报错。

Example Code

应该是 https://github.com/codefuse-ai/CodeFuse-muAgent/blob/main/muagent/chat/code_chat.py#L59 的问题

    codes_res = search_code(query=query, cb_name=self.engine_name, code_limit=self.code_limit,
                                search_type=self.cb_search_type,
                                history_node_list=self.history_node_list,
                                api_key=llm_config.api_key,
                                api_base_url=llm_config.api_base_url,
                                model_name=llm_config.model_name,
                                temperature=llm_config.temperature,
                                embed_model=embed_config.embed_model,
                                embed_model_path=embed_config.embed_model_path,
                                embed_engine=embed_config.embed_engine,
                                model_device=embed_config.model_device,
                                embed_config=embed_config
                                )

search_code() 没有传递 local_graph_path变量,search_code()中local_graph_path默认为``,这不是正确的路径

Error Message and Stack Trace (if applicable)

File "/opt/miniconda3/envs/devopsgpt/lib/python3.9/site-packages/muagent/codechat/codebase_handler/codebase_handler.py", line 163, in search_code
    code_search = CodeSearch(llm_config=self.llm_config, nh=self.nh, ch=self.ch, limit=limit,
                  │                     │    │              │    │      │    │         └ 1
                  │                     │    │              │    │      │    └ <muagent.db_handler.vector_db_handler.chroma_handler.ChromaHandler object at 0x174324ca0>
                  │                     │    │              │    │      └ <muagent.codechat.codebase_handler.codebase_handler.CodeBaseHandler object at 0x174213eb0>
                  │                     │    │              │    └ None
                  │                     │    │              └ <muagent.codechat.codebase_handler.codebase_handler.CodeBaseHandler object at 0x174213eb0>
                  │                     │    └ LLMConfig()
                  │                     └ <muagent.codechat.codebase_handler.codebase_handler.CodeBaseHandler object at 0x174213eb0>
                  └ <class 'muagent.codechat.code_search.code_search.CodeSearch'>
  File "/opt/miniconda3/envs/devopsgpt/lib/python3.9/site-packages/muagent/codechat/code_search/code_search.py", line 46, in __init__
    with open(local_graph_file_path, 'r') as f:
              └ '/hermes_graph.json'
FileNotFoundError: [Errno 2] No such file or directory: '/hermes_graph.json'

@jiangyunpeng 请问这个问题你后来是怎么解决的呢

@jiangyunpeng 已合,我理解在chatbot调用的时候也应该直接传入才是。我再看看有没有其它需要约束的参数位置。感谢。
这个帖子没有其它问题的话,将于6点关闭。