QwenLM / Qwen-Agent

Agent framework and applications built upon Qwen2, featuring Function Calling, Code Interpreter, RAG, and Chrome extension.
https://pypi.org/project/qwen-agent/
Other
2.51k stars 249 forks source link

在memory.py的113行的中的日志是:{"keywords_zh": ["GDM", "非保险"], "keywords_en": ["GDM", "not insurance", "non-insurance"], "text": "GDM\nnot insurance"},现在可以调整其只输出英文关键词吗,因为我自己的文档都是英文的 #212

Open zhangjiuyang1993 opened 1 week ago

JianxinMa commented 1 week ago

https://github.com/QwenLM/Qwen-Agent/blob/main/qwen_agent/agents/keygen_strategies/gen_keyword.py

这个需求比较小众,目前没提供相关配置,需要改上面这个代码里的prompt,将

Question: Who are the authors of this article?
Keywords: {{"keywords_zh": ["作者"], "keywords_en": ["author"]}}

之类的例子改成

Question: Who are the authors of this article?
Keywords: {{"keywords_en": ["author"]}}

之类的,prompt里的指令也需要修改下,去掉双语相关的要求。