Skip to content

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

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

Closed
4 tasks done
jiangyunpeng opened this issue May 23, 2024 · 3 comments
Closed
4 tasks done

Comments

@jiangyunpeng
Copy link
Contributor

jiangyunpeng commented May 23, 2024

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'

@JunJieLiu51520
Copy link

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

@jiangyunpeng
Copy link
Contributor Author

提PR了 codefuse-ai/CodeFuse-muAgent#5

@lightislost
Copy link
Collaborator

lightislost commented May 29, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants