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

demo/demo_retrieval_agent.ipynb报错 #359

Open
3 tasks
XduSyL opened this issue Mar 19, 2024 · 6 comments
Open
3 tasks

demo/demo_retrieval_agent.ipynb报错 #359

XduSyL opened this issue Mar 19, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@XduSyL
Copy link

XduSyL commented Mar 19, 2024

Initial Checks

  • I have searched GitHub for a duplicate issue and I'm sure this is something new
  • I have read and followed the docs & demos and still think this is a bug
  • I am confident that the issue is with modelscope-agent (not my code, or another library in the ecosystem)

What happened + What you expected to happen

作者您好,非常感谢您的工作
我在研究您的工作时,出现了一些问题,还请麻烦您解答一下
在运行demo/demo_retrieval_agent.ipynb的例子进行向量库检索时,在实例化memory类时报错了

memory = MemoryWithRetrievalKnowledge(storage_path=storage_path,
                                         name = memory_agent_name,
                                         memory_path=memory_history_path)

跳到了这一行

self.embedding = embedding or ModelScopeEmbeddings(
            model_id='damo/nlp_gte_sentence-embedding_chinese-base')

报了如下错误
Could not import some python packages.Please install it with pip install modelscope.
ImportError: cannot import name 'models' from partially initialized module 'oss2' (most likely due to a circular import) (d:\Anaconda\envs\agent\lib\site-packages\oss2_init_.py)

The above exception was the direct cause of the following exception:

File "D:\Code\modelscope-agent\modelscope_agent\storage\vector_storage.py", line 30, in init
self.embedding = embedding or ModelScopeEmbeddings(
File "D:\Code\modelscope-agent\modelscope_agent\memory\memory_with_retrieval_knowledge.py", line 31, in init
self.store_knowledge = KnowledgeVector(
File "D:\Code\modelscope-agent\main.py", line 20, in
memory = MemoryWithRetrievalKnowledge(storage_path=storage_path,
ImportError: Could not import some python packages.Please install it with pip install modelscope.

Versions / Dependencies

Reproduction script

Issue Severity

None

@XduSyL XduSyL added the bug Something isn't working label Mar 19, 2024
@zzhangpurdue
Copy link
Collaborator

是否本地pip install modelscope

@XduSyL
Copy link
Author

XduSyL commented Mar 19, 2024

是否本地pip install modelscope
在本地安装过modelscope了

@XduSyL
Copy link
Author

XduSyL commented Mar 19, 2024

是否本地pip install modelscope

执行其他demo是正常的

@zzhangpurdue
Copy link
Collaborator

目前没法复现,可能的是,里面有些requirements出现了版本问题。你是完全跟据demo一行行执行下来的么?那个requirements.txt也是完整安装的么?

@XduSyL
Copy link
Author

XduSyL commented Mar 20, 2024

请问一下在demo/demo_qwen_agent.ipynb的demo中,如果我要与大模型进行多轮会话的话要怎么操作呀,因为,我看RolePlay这个类实例化之后,最大执行次数默认为10,但是好像是单次就break了。

@zzhangpurdue
Copy link
Collaborator

这里的执行测试默认10,相当于他在做self-reflection,每一步他的结果他会去分析,还有什么不对的或者需要完善的,如果没有了,这一轮结束。也就是该单次聊天结束,需要多轮的话,参考这个链接

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

3 participants