kwaikeg / kwaiagents Goto Github PK
View Code? Open in Web Editor NEWA generalized information-seeking agent system with Large Language Models (LLMs).
License: Other
A generalized information-seeking agent system with Large Language Models (LLMs).
License: Other
(agent) root# python setup.py develop
running develop
/ML-A100/public/tmp/miniconda3/envs/agent/lib/python3.10/site-packages/setuptools/command/develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` and ``easy_install``.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
See https://github.com/pypa/setuptools/issues/917 for details.
********************************************************************************
!!
easy_install.initialize_options(self)
/ML-A100/public/tmp/miniconda3/envs/agent/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` directly.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
********************************************************************************
!!
self.initialize_options()
running egg_info
writing kwaiagents.egg-info/PKG-INFO
writing dependency_links to kwaiagents.egg-info/dependency_links.txt
writing entry points to kwaiagents.egg-info/entry_points.txt
writing requirements to kwaiagents.egg-info/requires.txt
writing top-level names to kwaiagents.egg-info/top_level.txt
reading manifest file 'kwaiagents.egg-info/SOURCES.txt'
adding license file 'LICENSE.txt'
writing manifest file 'kwaiagents.egg-info/SOURCES.txt'
running build_ext
Creating /ML-A100/public/tmp/miniconda3/envs/agent/lib/python3.10/site-packages/kwaiagents.egg-link (link to .)
kwaiagents 0.0.1 is already the active version in easy-install.pth
Installing kagentsys script to /ML-A100/public/tmp/miniconda3/envs/agent/bin
Installed /ML-A100/public/tmp/yiguofeng/KwaiAgents
Processing dependencies for kwaiagents==0.0.1
error: cryptography 43.0.0.dev1 is installed but cryptography<43,>=41.0.5 is required by {'pyOpenSSL'}
环境不兼容
Can the KAgentInstruct dataset be open sourced or used as a reference;Thank you.
Meta-agent tuning的代码会公布吗?数据要怎样读入模型进行微调呢,可否给出示例?
有几个没太明白想请问一下, 这几个任务:plan, tools, reflection, conclusion, profile分别是测试模型的什么方面呢(看数据集和论文没太理解),这几个任务都需要联网调用api吗,如果机器不能联网可以测试哪些任务呢,感谢解答🙏
Hi, 感谢您针对“训练集(KAgentlnstruct)ReACT数据问题”进行解决并更新了数据集,但我仍发现数据中存在下述现象与问题:
1)训练集中“toolllama”存在较多相似数据 (相似数据会降低数据多样性,影响模型能力?)
这类相似数据的input非常类似,且答案一般如下:
\nThought: \nAction: top_memes_for_reddit_meme\nAction Input: {}
2)数据的response中存在语言不一致情况 (这种问题可能会造成模型选择回复语言混乱?)
例如数据中,提问使用的是中文,在response中,思考等使用的是英文,回复使用的是中文
3)训练集中react的prompt input部分不应包含“Thought”、"Final Answer"等组件名称,这些组件名称应放到response中训练
由于react需学习思考、动作、观察与结果的时机,且在实际使用时也由模型生成,故这些组件名称应放到response中训练
期待更新版训练数据的更新,再次感谢您的开源!
Hello, here are some questions and want to understand. Please kindly assist.
1.
May I know how to use kagentsys in conversation mode? Currently with default parameters in README, it can only have one question for prompt input with 5 iterations maximum.
2.
For MAT model of Baichuan2 published, the base training model is [Baichuan2-13B-Chat] or [Baichuan2-13B-Base]? If MAT finetuning is based on [Baichuan2-13B-Base], could we have some way to finetune well in [Baichuan2-13B-Chat]?
3.
Did MAT models tested in other Agents framework, such as LangChain or AutoGPT? If yes, how is the performance.
Thank you in advance!
I have check that
curl http://10.22.51.10:21010/v1/chat/completions -H "Content-Type: application/json" -d '{"model": "kagentlms_qwen_7b_mat", "messages": [{"role": "user", "content": "刘德华是谁"}]}'
return ok
but when run
kagentsys --query="刘德华老婆是谁?" --llm_name="kagentlms_qwen_7b_mat" --use_local_llm --local_llm_host="10.22.51.10" --local_llm_port=21010 --lang="zh"
met error We couldn't connect to 'https://huggingface.co'
how to fix this
self.initialize_options()
aiohttp/_websocket.c: In function ‘__Pyx_ParseOptionalKeywords’:
aiohttp/_websocket.c:2166:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
2166 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_websocket.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
aiohttp/_websocket.c:2166:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
2166 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_websocket.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
aiohttp/_websocket.c:2166:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
2166 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_websocket.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
aiohttp/_websocket.c:2166:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
2166 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_websocket.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
aiohttp/_websocket.c:2166:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
2166 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_websocket.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
aiohttp/_websocket.c:2166:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
2166 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_websocket.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
aiohttp/_websocket.c:2182:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
2182 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_websocket.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
aiohttp/_websocket.c:2182:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
2182 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_websocket.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
aiohttp/_websocket.c:2182:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
2182 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_websocket.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
aiohttp/_websocket.c:2182:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
2182 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_websocket.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
aiohttp/_websocket.c:2182:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
2182 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_websocket.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
aiohttp/_websocket.c:2182:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
2182 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_websocket.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
aiohttp/_find_header.c: In function ‘find_header’:
aiohttp/_find_header.c:21:19: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
21 | char *pchar = str;
| ^~~
aiohttp/_find_header.c:9997:1: warning: label ‘missing’ defined but not used [-Wunused-label]
9997 | missing:
| ^~~~~~~
aiohttp/_find_header.c:27:1: warning: label ‘INITIAL’ defined but not used [-Wunused-label]
27 | INITIAL:
| ^~~~~~~
aiohttp/_http_parser.c: In function ‘__pyx_f_7aiohttp_12_http_parser_cb_on_header_field’:
aiohttp/_http_parser.c:11643:34: warning: comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘long int’} and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
11643 | __pyx_t_6 = ((__pyx_v_size > __pyx_v_pyparser->_max_field_size) != 0);
| ^
aiohttp/_http_parser.c:11739:148: warning: passing argument 2 of ‘__pyx_v_pyparser->__pyx_vtab->_on_header_field’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
11739 | __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpParser *)__pyx_v_pyparser->__pyx_vtab)->_on_header_field(__pyx_v_pyparser, __pyx_v_at, __pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L3_error)
| ^~~~~~~~~~
aiohttp/_http_parser.c:11739:148: note: expected ‘char *’ but argument is of type ‘const char *’
aiohttp/_http_parser.c: In function ‘__pyx_f_7aiohttp_12_http_parser_cb_on_header_value’:
aiohttp/_http_parser.c:11961:34: warning: comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘long int’} and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
11961 | __pyx_t_6 = ((__pyx_v_size > __pyx_v_pyparser->_max_field_size) != 0);
| ^
aiohttp/_http_parser.c:12057:148: warning: passing argument 2 of ‘__pyx_v_pyparser->__pyx_vtab->_on_header_value’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
12057 | __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpParser *)__pyx_v_pyparser->__pyx_vtab)->_on_header_value(__pyx_v_pyparser, __pyx_v_at, __pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L3_error)
| ^~~~~~~~~~
aiohttp/_http_parser.c:12057:148: note: expected ‘char *’ but argument is of type ‘const char ’
aiohttp/_http_parser.c: In function ‘__pyx_tp_dealloc_7aiohttp_12_http_parser_HttpParser’:
aiohttp/_http_parser.c:16227:5: error: lvalue required as increment operand
16227 | ++Py_REFCNT(o);
| ^~
aiohttp/_http_parser.c:16229:5: error: lvalue required as decrement operand
16229 | --Py_REFCNT(o);
| ^~
aiohttp/_http_parser.c: In function ‘__Pyx_decode_c_bytes’:
aiohttp/_http_parser.c:19932:9: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations]
19932 | return PyUnicode_FromUnicode(NULL, 0);
| ^~~~~~
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_http_parser.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:551:42: note: declared here
551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject) PyUnicode_FromUnicode(
| ^~~~~~~~~~~~~~~~~~~~~
aiohttp/_http_parser.c: In function ‘__Pyx_ParseOptionalKeywords’:
aiohttp/_http_parser.c:20030:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
20030 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_http_parser.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
aiohttp/_http_parser.c:20030:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
20030 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_http_parser.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
aiohttp/_http_parser.c:20030:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
20030 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_http_parser.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
aiohttp/_http_parser.c:20030:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
20030 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_http_parser.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
aiohttp/_http_parser.c:20030:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
20030 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_http_parser.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
aiohttp/_http_parser.c:20030:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
20030 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_http_parser.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
aiohttp/_http_parser.c:20046:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
20046 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_http_parser.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
aiohttp/_http_parser.c:20046:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
20046 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_http_parser.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
aiohttp/_http_parser.c:20046:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
20046 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_http_parser.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
aiohttp/_http_parser.c:20046:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
20046 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_http_parser.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
aiohttp/_http_parser.c:20046:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
20046 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_http_parser.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
aiohttp/_http_parser.c:20046:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
20046 | (PyUnicode_GET_SIZE(*argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_http_parser.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
aiohttp/_http_parser.c: In function ‘__Pyx_decode_c_string’:
aiohttp/_http_parser.c:21230:9: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations]
21230 | return PyUnicode_FromUnicode(NULL, 0);
| ^~~~~~
In file included from /data02/miniconda/envs/KwaiAgents/include/python3.10/unicodeobject.h:1046,
from /data02/miniconda/envs/KwaiAgents/include/python3.10/Python.h:83,
from aiohttp/_http_parser.c:4:
/data02/miniconda/envs/KwaiAgents/include/python3.10/cpython/unicodeobject.h:551:42: note: declared here
551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject) PyUnicode_FromUnicode(
| ^~~~~~~~~~~~~~~~~~~~~
aiohttp/_http_parser.c: In function ‘__Pyx_Coroutine_Send’:
aiohttp/_http_parser.c:23271:19: warning: implicit declaration of function ‘_PyGen_Send’; did you mean ‘_PyGen_yf’? [-Wimplicit-function-declaration]
23271 | ret = _PyGen_Send((PyGenObject)yf, value == Py_None ? NULL : value);
| ^~~~~~~~~~~
| _PyGen_yf
aiohttp/_http_parser.c:23271:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object ’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
23271 | ret = _PyGen_Send((PyGenObject)yf, value == Py_None ? NULL : value);
| ^
aiohttp/_http_parser.c:23276:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object ’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
23276 | ret = _PyGen_Send((PyGenObject)yf, value == Py_None ? NULL : value);
| ^
aiohttp/_http_parser.c: In function ‘__Pyx_Generator_Next’:
aiohttp/_http_parser.c:23360:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object ’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
23360 | ret = _PyGen_Send((PyGenObject)yf, NULL);
| ^
error: Setup script exited with error: command '/usr/bin/gcc' failed with exit code 1
from awq import AutoAWQForCausalLM
from transformers import AutoTokenizer
model_path = '/home/ubuntu/kagentlms_qwen_14b_mat'
quant_path = 'kagentlms_qwen14bmat-awq'
quant_config = { "zero_point": True, "q_group_size": 128, "w_bit": 8, "version": "GEMM" }
model = AutoAWQForCausalLM.from_pretrained(model_path, **{"low_cpu_mem_usage": True})
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
model.quantize(tokenizer, quant_config=quant_config)
model.save_quantized(quant_path)
tokenizer.save_pretrained(quant_path)
RuntimeError: cutlassF: no kernel found to launch!
错误是:
FileNotFoundError: [Errno 2] No such file or directory: '../kagentlms_qwen_14b_mat/pytorch_model-00001-of-00004.bin'
如题,正常应该像图右方所示,产生thought
但在我们环境中,使用kagentsys,无法产生thought和后续动作(如图左方),这个可以如何跟踪排查呢?
logging as below:
***** Question *****
Who is Andy Lau's wife?
🤔 thinking...
execution duration: 0.000s
'choices'
'choices'
'choices'
'choices'
'choices'
Traceback (most recent call last):
File "/home/pgpu/Code/KwaiAgents/kwaiagents/agents/kagent.py", line 130, in task_plan
response, _ = create_chat_completion(
File "/home/pgpu/Code/KwaiAgents/kwaiagents/llms/init.py", line 44, in create_chat_completion
raise RuntimeError(f"Failed to get response after {num_retries} retries")
RuntimeError: Failed to get response after 5 retries
Traceback (most recent call last):
File "/home/pgpu/Code/KwaiAgents/kwaiagents/agents/kagent.py", line 130, in task_plan
response, _ = create_chat_completion(
File "/home/pgpu/Code/KwaiAgents/kwaiagents/llms/init.py", line 44, in create_chat_completion
raise RuntimeError(f"Failed to get response after {num_retries} retries")
RuntimeError: Failed to get response after 5 retries
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pgpu/Code/KwaiAgents/kwaiagents/agent_start.py", line 64, in chat
agent_results = agent.chat(
File "/home/pgpu/Code/KwaiAgents/kwaiagents/agents/kagent.py", line 270, in chat
new_tasks = self.task_plan(goal, memory)
File "/home/pgpu/Code/KwaiAgents/kwaiagents/agents/kagent.py", line 143, in task_plan
print("+" + response)
UnboundLocalError: local variable 'response' referenced before assignment
用如下命令可以生成requirements.txt
pip freeze > requirements.txt
您好,请问Reflexion测试模型的反思,具体是如何体现模型的反思能力的?
如何向KAgentSys添加新的tool,有更详细的文档吗
https://huggingface.co/kwaikeg/kagentlms_qwen1.5_14b_mat/tree/main 无模型权重文件,是还没有正式发布吗?
hello,How to customize a tool and invoke it, similar to langchain? Or directly use langchain.
openai-key 写在哪里
Thanks for your great work! It appears that the open-sourced KAgentSys-Lite may have limitations compared to the more powerful tools used in KAgentSys as described in the paper. As a result, it is crucial to understand what the experimental results of KAgentSys-Lite would be on KAgentBench, similar to the results presented in Table 3 of the paper. This information holds significant importance for the users of KAgentSys-Lite.
非常有启发性的项目,我从中学到很多知识。
希望尽快深入了解有关模型训练的细节及数据,非常感谢!
能上传到魔搭吗,这样国内下载快一点
Hi, I found there is a bug in benchmark_eval.py. Belowed is the original code of the get_tool_metric.
def get_tool_metric(golden_toolnames, golden_tool_args, tool_name, tool_args):
tool_metrics = []
for golden_toolname, golden_tool_arg in zip(golden_toolnames, golden_tool_args):
if golden_toolname == 'None':
continue
tool_em = 1 if tool_name == golden_toolname else 0
avg_arg_rouges = []
if golden_tool_arg == {} and tool_args == {}:
avg_arg_rouges = [1.]
elif tool_args != {}:
for k,v in golden_tool_arg.items():
for k1,v1 in tool_args.items():
if k1 == k:
avg_arg_rouges.append(calculate_rouge_l(v, v1))
break
avg_arg_rouges.append(0.)
else:
avg_arg_rouges = [0.]
arg_rouge = sum(avg_arg_rouges) / len(avg_arg_rouges) if len(avg_arg_rouges)>0 else 0
tool_metrics.append(arg_rouge * tool_em)
if len(tool_metrics) == 0:
tool_metrics = [0.]
return max(tool_metrics)
When tool_args!={}
, the logic is to find a matched key between tool_args
and gloden_tool_arg
, and if there is a match, i.e., k1==k, we calculate the rougle_l and append to the list avg_arg_rouges
. If there is not matched key, a 0 score will be append to avg_arg_rouges
. However, when there is a match, accutually two values will be appended to avg_arg_rouges
, one is the rouge_l, the other is 0.
A revised version should be as follows:
def get_tool_metric(golden_toolnames, golden_tool_args, tool_name, tool_args):
tool_metrics = []
for golden_toolname, golden_tool_arg in zip(golden_toolnames, golden_tool_args):
if golden_toolname == 'None':
continue
tool_em = 1 if tool_name == golden_toolname else 0
avg_arg_rouges = []
if golden_tool_arg == {} and tool_args == {}:
avg_arg_rouges = [1.]
elif tool_args != {}:
# original implementation
# for k,v in golden_tool_arg.items():
# for k1,v1 in tool_args.items():
# if k1 == k:
# avg_arg_rouges.append(calculate_rouge_l(v, v1))
# break
# avg_arg_rouges.append(0.)
# new implementation
for k,v in golden_tool_arg.items():
match_k = False
for k1,v1 in tool_args.items():
if k1 == k:
avg_arg_rouges.append(calculate_rouge_l(v, v1))
match_k = True
break
if not match_k:
avg_arg_rouges.append(0.)
else:
avg_arg_rouges = [0.]
arg_rouge = sum(avg_arg_rouges) / len(avg_arg_rouges) if len(avg_arg_rouges)>0 else 0
tool_metrics.append(arg_rouge * tool_em)
if len(tool_metrics) == 0:
tool_metrics = [0.]
return max(tool_metrics)
kagentsys --query="刘德华老婆是谁?" --llm_name="kagentlms_qwen_7b_mat" --use_local_llm --local_llm_host="localhost" --local_llm_port=8899 --lang="zh"
File "/opt/conda/lib/python3.10/site-packages/trio-0.24.0-py3.10.egg/trio/_core/_io_epoll.py", line 203, in EpollIOManager
_epoll: select.epoll = attr.ib(factory=select.epoll)
AttributeError: module 'eventlet.green.select' has no attribute 'epoll'
还有就是:单卡模型推理服务 ,加载模型后隔一小段时间后就会崩溃,然后出现以下提示
ValueError: The model's max seq len (8192) is larger than the maximum number of tokens that can be stored in KV cache (5392). Try increasing gpu_memory_utilization
or decreasing max_model_len
when initializing the engine.
运行的环境是魔搭阿里云DSW,T_T。。。求大佬帮忙解决
| INFO | stdout | INFO: 127.0.0.1:59622 - "POST /v1/completions/ HTTP/1.1" 307 Temporary Redirect
使用lite gpt3.5进行测试,只能进行一步思考,请问哪些模型能够支持多步思考?
Hello, may we have the training/finetune code with kwaiAgentInstruct, specially finetu ne for Qwen. Thank you!
哈喽,感谢您们精彩的工作!我认为这是十分有意义的。但是我有几个困惑。
我理解针对于Kagent这个框架,数据集中"type": "plantooluse"是为了验证模型的plan多步骤能力。但是:
感谢! 并且期待您的回复!
谢谢!
有没有相关的技术讨论微信群?
KwaiKEG/kagentlms_qwen_7b_mat
Qwen/Qwen-7B-Chat
两个都一样的提示。
尝试qwen1.5新版本,提示keyerror,qwen2
`(base) liuqi-de-MacBook-Pro:KwaiAgents liuqi$ pip install -r requirements.txt
Collecting bs4 (from -r requirements.txt (line 1))
Downloading bs4-0.0.1.tar.gz (1.1 kB)
Preparing metadata (setup.py) ... done
Collecting pandas (from -r requirements.txt (line 2))
Downloading pandas-2.1.4-cp311-cp311-macosx_11_0_arm64.whl.metadata (18 kB)
Collecting docstring_parser (from -r requirements.txt (line 3))
Downloading docstring_parser-0.15-py3-none-any.whl (36 kB)
Collecting lunar_python==1.3.2 (from -r requirements.txt (line 4))
Downloading lunar_python-1.3.2.tar.gz (103 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 103.7/103.7 kB 2.2 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Collecting duckduckgo-search==4.1.1 (from -r requirements.txt (line 5))
Downloading duckduckgo_search-4.1.1-py3-none-any.whl.metadata (19 kB)
Collecting selenium==4.1.4 (from -r requirements.txt (line 6))
Downloading selenium-4.1.4-py3-none-any.whl (979 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 979.3/979.3 kB 9.9 MB/s eta 0:00:00
Collecting webdriver-manager==3.8.6 (from -r requirements.txt (line 7))
Downloading webdriver_manager-3.8.6-py2.py3-none-any.whl (27 kB)
Collecting openai==0.27.8 (from -r requirements.txt (line 8))
Downloading openai-0.27.8-py3-none-any.whl.metadata (13 kB)
Collecting translate==3.6.1 (from -r requirements.txt (line 9))
Downloading translate-3.6.1-py2.py3-none-any.whl (12 kB)
Collecting ephem==4.1.4 (from -r requirements.txt (line 10))
Downloading ephem-4.1.4.tar.gz (1.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 26.5 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Collecting click>=8.1.7 (from duckduckgo-search==4.1.1->-r requirements.txt (line 5))
Downloading click-8.1.7-py3-none-any.whl.metadata (3.0 kB)
Collecting lxml>=4.9.3 (from duckduckgo-search==4.1.1->-r requirements.txt (line 5))
Downloading lxml-5.0.0-cp311-cp311-macosx_11_0_universal2.whl.metadata (6.7 kB)
Collecting curl-cffi>=0.5.10 (from duckduckgo-search==4.1.1->-r requirements.txt (line 5))
Downloading curl_cffi-0.5.10-cp37-abi3-macosx_11_0_arm64.whl.metadata (7.9 kB)
Requirement already satisfied: urllib3~=1.26 in /Users/liuqi/miniconda3/lib/python3.11/site-packages (from urllib3[secure,socks]=1.26->selenium==4.1.4->-r requirements.txt (line 6)) (1.26.18)=0.17 (from selenium==4.1.4->-r requirements.txt (line 6))
Collecting trio
Downloading trio-0.23.2-py3-none-any.whl.metadata (4.9 kB)
Collecting trio-websocket~=0.9 (from selenium==4.1.4->-r requirements.txt (line 6))
Downloading trio_websocket-0.11.1-py3-none-any.whl.metadata (4.7 kB)
Requirement already satisfied: requests in /Users/liuqi/miniconda3/lib/python3.11/site-packages (from webdriver-manager==3.8.6->-r requirements.txt (line 7)) (2.31.0)
Collecting python-dotenv (from webdriver-manager==3.8.6->-r requirements.txt (line 7))
Downloading python_dotenv-1.0.0-py3-none-any.whl (19 kB)
Requirement already satisfied: tqdm in /Users/liuqi/miniconda3/lib/python3.11/site-packages (from webdriver-manager==3.8.6->-r requirements.txt (line 7)) (4.65.0)
Requirement already satisfied: packaging in /Users/liuqi/miniconda3/lib/python3.11/site-packages (from webdriver-manager==3.8.6->-r requirements.txt (line 7)) (23.1)
Collecting aiohttp (from openai==0.27.8->-r requirements.txt (line 8))
Downloading aiohttp-3.9.1-cp311-cp311-macosx_11_0_arm64.whl.metadata (7.4 kB)
Collecting libretranslatepy==2.1.1 (from translate==3.6.1->-r requirements.txt (line 9))
Downloading libretranslatepy-2.1.1-py3-none-any.whl (3.2 kB)
Collecting beautifulsoup4 (from bs4->-r requirements.txt (line 1))
Downloading beautifulsoup4-4.12.2-py3-none-any.whl (142 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 143.0/143.0 kB 18.6 MB/s eta 0:00:00
Collecting numpy<2,>=1.23.2 (from pandas->-r requirements.txt (line 2))
Downloading numpy-1.26.3-cp311-cp311-macosx_11_0_arm64.whl.metadata (115 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 115.1/115.1 kB 14.0 MB/s eta 0:00:00
Collecting python-dateutil>=2.8.2 (from pandas->-r requirements.txt (line 2))
Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 kB 27.5 MB/s eta 0:00:00
Collecting pytz>=2020.1 (from pandas->-r requirements.txt (line 2))
Downloading pytz-2023.3.post1-py2.py3-none-any.whl.metadata (22 kB)
Collecting tzdata>=2022.1 (from pandas->-r requirements.txt (line 2))
Downloading tzdata-2023.4-py2.py3-none-any.whl.metadata (1.4 kB)
Requirement already satisfied: cffi>=1.12.0 in /Users/liuqi/miniconda3/lib/python3.11/site-packages (from curl-cffi>=0.5.10->duckduckgo-search==4.1.1->-r requirements.txt (line 5)) (1.16.0)
Collecting six>=1.5 (from python-dateutil>=2.8.2->pandas->-r requirements.txt (line 2))
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Requirement already satisfied: charset-normalizer<4,>=2 in /Users/liuqi/miniconda3/lib/python3.11/site-packages (from requests->webdriver-manager==3.8.6->-r requirements.txt (line 7)) (2.0.4)
Requirement already satisfied: idna<4,>=2.5 in /Users/liuqi/miniconda3/lib/python3.11/site-packages (from requests->webdriver-manager==3.8.6->-r requirements.txt (line 7)) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in /Users/liuqi/miniconda3/lib/python3.11/site-packages (from requests->webdriver-manager==3.8.6->-r requirements.txt (line 7)) (2023.11.17)
Collecting attrs>=20.1.0 (from trio~=0.17->selenium==4.1.4->-r requirements.txt (line 6))
Downloading attrs-23.2.0-py3-none-any.whl.metadata (9.5 kB)
Collecting sortedcontainers (from trio~=0.17->selenium==4.1.4->-r requirements.txt (line 6))
Downloading sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB)
Collecting outcome (from trio~=0.17->selenium==4.1.4->-r requirements.txt (line 6))
Downloading outcome-1.3.0.post0-py2.py3-none-any.whl.metadata (2.6 kB)
Collecting sniffio>=1.3.0 (from trio~=0.17->selenium==4.1.4->-r requirements.txt (line 6))
Downloading sniffio-1.3.0-py3-none-any.whl (10 kB)
Collecting wsproto>=0.14 (from trio-websocket~=0.9->selenium==4.1.4->-r requirements.txt (line 6))
Downloading wsproto-1.2.0-py3-none-any.whl (24 kB)
Requirement already satisfied: pyOpenSSL>=0.14 in /Users/liuqi/miniconda3/lib/python3.11/site-packages (from urllib3[secure,socks]=1.26->selenium==4.1.4->-r requirements.txt (line 6)) (23.2.0)=1.26->selenium==4.1.4->-r requirements.txt (line 6)) (41.0.7)
Requirement already satisfied: cryptography>=1.3.4 in /Users/liuqi/miniconda3/lib/python3.11/site-packages (from urllib3[secure,socks]
Collecting urllib3-secure-extra (from urllib3[secure,socks]=1.26->selenium==4.1.4->-r requirements.txt (line 6))=1.26->selenium==4.1.4->-r requirements.txt (line 6)) (1.7.1)
Downloading urllib3_secure_extra-0.1.0-py2.py3-none-any.whl (1.4 kB)
Requirement already satisfied: PySocks!=1.5.7,<2.0,>=1.5.6 in /Users/liuqi/miniconda3/lib/python3.11/site-packages (from urllib3[secure,socks]
Collecting multidict<7.0,>=4.5 (from aiohttp->openai==0.27.8->-r requirements.txt (line 8))
Downloading multidict-6.0.4-cp311-cp311-macosx_11_0_arm64.whl (29 kB)
Collecting yarl<2.0,>=1.0 (from aiohttp->openai==0.27.8->-r requirements.txt (line 8))
Downloading yarl-1.9.4-cp311-cp311-macosx_11_0_arm64.whl.metadata (31 kB)
Collecting frozenlist>=1.1.1 (from aiohttp->openai==0.27.8->-r requirements.txt (line 8))
Downloading frozenlist-1.4.1-cp311-cp311-macosx_11_0_arm64.whl.metadata (12 kB)
Collecting aiosignal>=1.1.2 (from aiohttp->openai==0.27.8->-r requirements.txt (line 8))
Downloading aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
Collecting soupsieve>1.2 (from beautifulsoup4->bs4->-r requirements.txt (line 1))
Downloading soupsieve-2.5-py3-none-any.whl.metadata (4.7 kB)
Requirement already satisfied: pycparser in /Users/liuqi/miniconda3/lib/python3.11/site-packages (from cffi>=1.12.0->curl-cffi>=0.5.10->duckduckgo-search==4.1.1->-r requirements.txt (line 5)) (2.21)
Collecting h11<1,>=0.9.0 (from wsproto>=0.14->trio-websocket~=0.9->selenium==4.1.4->-r requirements.txt (line 6))
Downloading h11-0.14.0-py3-none-any.whl (58 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.3/58.3 kB 9.6 MB/s eta 0:00:00
Downloading duckduckgo_search-4.1.1-py3-none-any.whl (26 kB)
Downloading openai-0.27.8-py3-none-any.whl (73 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 73.6/73.6 kB 8.4 MB/s eta 0:00:00
Downloading pandas-2.1.4-cp311-cp311-macosx_11_0_arm64.whl (10.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.8/10.8 MB 1.3 MB/s eta 0:00:00
Downloading click-8.1.7-py3-none-any.whl (97 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.9/97.9 kB 1.9 MB/s eta 0:00:00
Downloading curl_cffi-0.5.10-cp37-abi3-macosx_11_0_arm64.whl (2.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.2/2.2 MB 1.2 MB/s eta 0:00:00
Downloading lxml-5.0.0-cp311-cp311-macosx_11_0_universal2.whl (8.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.8/8.8 MB 1.2 MB/s eta 0:00:00
Downloading numpy-1.26.3-cp311-cp311-macosx_11_0_arm64.whl (14.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.0/14.0 MB 1.2 MB/s eta 0:00:00
Downloading pytz-2023.3.post1-py2.py3-none-any.whl (502 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 502.5/502.5 kB 1.4 MB/s eta 0:00:00
Downloading trio-0.23.2-py3-none-any.whl (461 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 461.6/461.6 kB 1.3 MB/s eta 0:00:00
Downloading trio_websocket-0.11.1-py3-none-any.whl (17 kB)
Downloading tzdata-2023.4-py2.py3-none-any.whl (346 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 346.6/346.6 kB 1.5 MB/s eta 0:00:00
Downloading aiohttp-3.9.1-cp311-cp311-macosx_11_0_arm64.whl (386 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 386.8/386.8 kB 1.3 MB/s eta 0:00:00
Downloading attrs-23.2.0-py3-none-any.whl (60 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.8/60.8 kB 1.1 MB/s eta 0:00:00
Downloading frozenlist-1.4.1-cp311-cp311-macosx_11_0_arm64.whl (53 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.4/53.4 kB 897.8 kB/s eta 0:00:00
Downloading soupsieve-2.5-py3-none-any.whl (36 kB)
Downloading yarl-1.9.4-cp311-cp311-macosx_11_0_arm64.whl (81 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 81.2/81.2 kB 1.5 MB/s eta 0:00:00
Downloading outcome-1.3.0.post0-py2.py3-none-any.whl (10 kB)
Building wheels for collected packages: lunar_python, ephem, bs4
Building wheel for lunar_python (setup.py) ... done
Created wheel for lunar_python: filename=lunar_python-1.3.2-py3-none-any.whl size=113790 sha256=1dbcb26512c9c700eb995a0c9d13685eafc0cf6b3e9f26ab5426b1aac60ac2d8
Stored in directory: /Users/liuqi/Library/Caches/pip/wheels/6a/73/58/1b80d8b1e096d6e501e68af3b0b06d0853d174fe1840a93161
Building wheel for ephem (setup.py) ... done
Created wheel for ephem: filename=ephem-4.1.4-cp311-cp311-macosx_11_0_arm64.whl size=1421773 sha256=825829c986be5b9020a8087634c6c6b39ae11920ed93d6406d2e69872b12ae98
Stored in directory: /Users/liuqi/Library/Caches/pip/wheels/c8/40/d4/dda0a71c5a493dafbcc1f1a5dca07363f6ff2d12046879f109
Building wheel for bs4 (setup.py) ... done
Created wheel for bs4: filename=bs4-0.0.1-py3-none-any.whl size=1256 sha256=412e0f58edaf7553bc201a656ffaa1046b1227b7ef04ff6686e10048933cdcaa
Stored in directory: /Users/liuqi/Library/Caches/pip/wheels/d4/c8/5b/b5be9c20e5e4503d04a6eac8a3cd5c2393505c29f02bea0960
Successfully built lunar_python ephem bs4
Installing collected packages: urllib3-secure-extra, sortedcontainers, pytz, lunar_python, libretranslatepy, ephem, tzdata, soupsieve, sniffio, six, python-dotenv, numpy, multidict, lxml, h11, frozenlist, docstring_parser, click, attrs, yarl, wsproto, webdriver-manager, translate, python-dateutil, outcome, curl-cffi, beautifulsoup4, aiosignal, trio, pandas, duckduckgo-search, bs4, aiohttp, trio-websocket, openai, selenium
Successfully installed aiohttp-3.9.1 aiosignal-1.3.1 attrs-23.2.0 beautifulsoup4-4.12.2 bs4-0.0.1 click-8.1.7 curl-cffi-0.5.10 docstring_parser-0.15 duckduckgo-search-4.1.1 ephem-4.1.4 frozenlist-1.4.1 h11-0.14.0 libretranslatepy-2.1.1 lunar_python-1.3.2 lxml-5.0.0 multidict-6.0.4 numpy-1.26.3 openai-0.27.8 outcome-1.3.0.post0 pandas-2.1.4 python-dateutil-2.8.2 python-dotenv-1.0.0 pytz-2023.3.post1 selenium-4.1.4 six-1.16.0 sniffio-1.3.0 sortedcontainers-2.4.0 soupsieve-2.5 translate-3.6.1 trio-0.23.2 trio-websocket-0.11.1 tzdata-2023.4 urllib3-secure-extra-0.1.0 webdriver-manager-3.8.6 wsproto-1.2.0 yarl-1.9.4
(base) liuqi-de-MacBook-Pro:KwaiAgents liuqi$ pip install vllm
Collecting vllm
Downloading vllm-0.2.7.tar.gz (170 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 170.8/170.8 kB 866.3 kB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [28 lines of output]
/private/var/folders/j9/6yjlhjjd3gvgb8xsw4jl0vb40000gp/T/pip-build-env-nmd98nig/overlay/lib/python3.11/site-packages/torch/nn/modules/transformer.py:20: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at /Users/runner/work/pytorch/pytorch/pytorch/torch/csrc/utils/tensor_numpy.cpp:84.)
device: torch.device = torch.device(torch._C._get_default_device()), # torch.device('cpu'),
Traceback (most recent call last):
File "/Users/liuqi/miniconda3/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
main()
File "/Users/liuqi/miniconda3/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/liuqi/miniconda3/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/j9/6yjlhjjd3gvgb8xsw4jl0vb40000gp/T/pip-build-env-nmd98nig/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/j9/6yjlhjjd3gvgb8xsw4jl0vb40000gp/T/pip-build-env-nmd98nig/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "/private/var/folders/j9/6yjlhjjd3gvgb8xsw4jl0vb40000gp/T/pip-build-env-nmd98nig/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "", line 230, in
File "/private/var/folders/j9/6yjlhjjd3gvgb8xsw4jl0vb40000gp/T/pip-build-env-nmd98nig/overlay/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 1076, in CUDAExtension
library_dirs += library_paths(cuda=True)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/j9/6yjlhjjd3gvgb8xsw4jl0vb40000gp/T/pip-build-env-nmd98nig/overlay/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 1203, in library_paths
if (not os.path.exists(_join_cuda_home(lib_dir)) and
^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/j9/6yjlhjjd3gvgb8xsw4jl0vb40000gp/T/pip-build-env-nmd98nig/overlay/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 2416, in _join_cuda_home
raise OSError('CUDA_HOME environment variable is not set. '
OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
(base) liuqi-de-MacBook-Pro:KwaiAgents liuqi$`
Really interesting work! I wonder where can we find the test data? ./benchmark_eval.jsonl Interesting on query set used to test out this setup. Also, did we consider/compare against Google's rich answer system? Such as its snippet answer?
hello,我下载了kagentlms_baichuan2_13b_mat模型,但是没办法通过fastchat部署,,以下是报错:
2024-03-11 22:02:00 | INFO | model_worker | args: Namespace(host='192.168.80.2', port=9015, worker_address='http://192.168.80.2:9015', controller_address='http://192.168.80.2:9083', model_path='/home/ssd1/record/llm_models/kagentlms_baichuan2_13b_mat/', revision='main', device='cuda', gpus=None, num_gpus=1, max_gpu_memory=None, dtype=None, load_8bit=False, cpu_offloading=False, gptq_ckpt=None, gptq_wbits=16, gptq_groupsize=-1, gptq_act_order=False, awq_ckpt=None, awq_wbits=16, awq_groupsize=-1, model_names=['kwai_agent_baichuan'], conv_template=None, embed_in_truncate=False, limit_worker_concurrency=5, stream_interval=2, no_register=False, seed=None)
2024-03-11 22:02:00 | INFO | model_worker | Loading the model ['kwai_agent_baichuan'] on worker a59d1063 ...
Could not locate the modeling_baichuan.py inside kwaikeg/kagentlms_baichuan2_13b_mat.
2024-03-11 22:02:03 | ERROR | stderr | Traceback (most recent call last):
2024-03-11 22:02:03 | ERROR | stderr | File "/root/anaconda3/envs/fschat2/lib/python3.10/site-packages/urllib3/connection.py", line 203, in _new_conn
2024-03-11 22:02:03 | ERROR | stderr | sock = connection.create_connection(
2024-03-11 22:02:03 | ERROR | stderr | File "/root/anaconda3/envs/fschat2/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
2024-03-11 22:02:03 | ERROR | stderr | raise err
2024-03-11 22:02:03 | ERROR | stderr | File "/root/anaconda3/envs/fschat2/lib/python3.10/site-packages/urllib3/util/connection.py", line 73, in create_connection
2024-03-11 22:02:03 | ERROR | stderr | sock.connect(sa)
2024-03-11 22:02:03 | ERROR | stderr | OSError: [Errno 101] Network is unreachable
2024-03-11 22:02:03 | ERROR | stderr |
2024-03-11 22:02:03 | ERROR | stderr | The above exception was the direct cause of the following exception:
2024-03-11 22:02:03 | ERROR | stderr |
2024-03-11 22:02:03 | ERROR | stderr | Traceback (most recent call last):
2024-03-11 22:02:03 | ERROR | stderr | File "/root/anaconda3/envs/fschat2/lib/python3.10/site-packages/urllib3/connectionpool.py", line 790, in urlopen
2024-03-11 22:02:03 | ERROR | stderr | response = self._make_request(
2024-03-11 22:02:03 | ERROR | stderr | File "/root/anaconda3/envs/fschat2/lib/python3.10/site-packages/urllib3/connectionpool.py", line 491, in _make_request
2024-03-11 22:02:03 | ERROR | stderr | raise new_e
2024-03-11 22:02:03 | ERROR | stderr | File "/root/anaconda3/envs/fschat2/lib/python3.10/site-packages/urllib3/connectionpool.py", line 467, in _make_request
2024-03-11 22:02:03 | ERROR | stderr | self._validate_conn(conn)
2024-03-11 22:02:03 | ERROR | stderr | File "/root/anaconda3/envs/fschat2/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1092, in _validate_conn
2024-03-11 22:02:03 | ERROR | stderr | conn.connect()
2024-03-11 22:02:03 | ERROR | stderr | File "/root/anaconda3/envs/fschat2/lib/python3.10/site-packages/urllib3/connection.py", line 611, in connect
2024-03-11 22:02:03 | ERROR | stderr | self.sock = sock = self._new_conn()
2024-03-11 22:02:03 | ERROR | stderr | File "/root/anaconda3/envs/fschat2/lib/python3.10/site-packages/urllib3/connection.py", line 218, in _new_conn
2024-03-11 22:02:03 | ERROR | stderr | raise NewConnectionError(
2024-03-11 22:02:03 | ERROR | stderr | urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f9aaccac430>: Failed to establish a new connection: [Errno 101] Network is unreachable
Could not locate the modeling_baichuan.py inside kwaikeg/kagentlms_baichuan2_13b_mat. 我已经在下好模型文件了啊
--external_knowledge参数在项目中没有使用
是否有开源Knowledge Memory的计划?
在清洗 KAgentInstruct 数据中,发现与KAgentBench存在数据泄漏问题。示例如下:
train数据
{'id': 'cd76e671-e350-4ea5-9dfa-cceb3db330f8',
'query': '你需要扮演一名专业的宇航员训练顾问,较好地回答用户当前问题。在回答问题时,你必须遵循如下流程:询问用户对太空探索或宇航员训练的兴趣。解释成为宇航员所需的基本条件和技能。概述宇航员的训练过程和挑战。讨论太空任务的日常生活和工作环境。提供相关的教育和训练资源信息。\n当前历史对话为:user: 我对太空探索和宇航员训练很感兴趣。\nyou: 太好了!太空探索是一个令人兴奋的领域。请问您对宇航员在太空中的紧急救援措施有什么特别感兴趣的吗?\nuser: 首先,我想了解一下成为宇航员需要具备哪些基本条件和技能?\nyou: 成为宇航员需要具备一定的基本条件和技能。首先,您需要拥有良好的身体素质,因为宇航员需要承受高强度的训练和太空环境的挑战。其次,您需要具备科学、技术、工程或数学等相关领域的学士学位。此外,宇航员还需要具备一定的飞行经验和团队合作精神。\nuser: 那么宇航员的训练过程和挑战是什么样的?\nyou: 宇航员的训练过程通常包括基本训练和任务特定训练。基本训练主要包括体能训练、太空生活技能培训、太空飞行器操作培训等。任务特定训练则针对具体的太空任务进行,例如在国际空间站上的实验操作、太空行走等。在训练过程中,宇航员需要面临许多挑战,如适应失重环境、应对紧急情况等。\n用户当前问题为:太空任务的日常生活和工作环境是怎样的?',
'functions': [],
'function_names': [],
'source': 'profile',
'llm_prompt_response': [{'instruction': '',
'input': '你需要扮演一名专业的宇航员训练顾问,较好地回答用户当前问题。在回答问题时,你必须遵循如下流程:询问用户对太空探索或宇航员训练的兴趣。解释成为宇航员所需的基本条件和技能。概述宇航员的训练过程和挑战。讨论太空任务的日常生活和工作环境。提供相关的教育和训练资源信息。\n当前历史对话为:user: 我对太空探索和宇航员训练很感兴趣。\nyou: 太好了!太空探索是一个令人兴奋的领域。请问您对宇航员在太空中的紧急救援措施有什么特别感兴趣的吗?\nuser: 首先,我想了解一下成为宇航员需要具备哪些基本条件和技能?\nyou: 成为宇航员需要具备一定的基本条件和技能。首先,您需要拥有良好的身体素质,因为宇航员需要承受高强度的训练和太空环境的挑战。其次,您需要具备科学、技术、工程或数学等相关领域的学士学位。此外,宇航员还需要具备一定的飞行经验和团队合作精神。\nuser: 那么宇航员的训练过程和挑战是什么样的?\nyou: 宇航员的训练过程通常包括基本训练和任务特定训练。基本训练主要包括体能训练、太空生活技能培训、太空飞行器操作培训等。任务特定训练则针对具体的太空任务进行,例如在国际空间站上的实验操作、太空行走等。在训练过程中,宇航员需要面临许多挑战,如适应失重环境、应对紧急情况等。\n用户当前问题为:太空任务的日常生活和工作环境是怎样的?',
'output': '在太空任务中,宇航员的日常生活和工作环境与地球上有很大不同。失重环境使得宇航员需要学会在空间站内移动和操作物体的新方法。此外,宇航员需要适应紧凑的生活空间、定期进行体能锻炼以保持身体健康,并且要适应特殊的饮食。在工作方面,宇航员需要执行各种实验、维护空间站设备以及与地面控制中心保持密切沟通。',
'llm_name': 'gpt4',
'human_edited': False}],
'extra_infos': {'full_source': 'role',
'datetime': None,
'human_score': None,
'human_score_reason': None,
'human_note': None}}
test数据
{'query': '太空任务的日常生活和工作环境是怎样的?',
'id': '1303179d-fa47-5462-83a7-431837b6a3d1',
'type': 'profile',
'memory': 'user: 你好,我对太空探索和宇航员训练很感兴趣。\nyou: 你好!很高兴你对太空探索和宇航员训练感兴趣。我是一名宇航员训练顾问,我可以回答你关于这方面的问题。\nuser: 请问成为宇航员需要具备哪些基本条件和技能?\nyou: 成为宇航员需要具备一定的基本条件和技能。首先,你需要拥有良好的身体素质,因为在太空中生活和工作需要承受极端环境。其次,你需要具备一定的教育背景,通常是在工程、科学、数学或计算机科学领域的学士学位。此外,宇航员还需要具备一定的飞行经验和团队合作能力。\nuser: 宇航员的训练过程和挑战是什么?\nyou: 宇航员的训练过程包括基本训练和任务训练两个阶段。基本训练主要包括生存训练、航天飞行器操作、空间行走训练等。任务训练则针对特定的太空任务,如科学实验、维修任务等。在训练过程中,宇航员需要面对许多挑战,如适应失重环境、应对紧急情况、进行高强度的体力和心理训练等。\n',
'memory_last_task': {},
'memory_type': '',
'funcs': [],
'golden_result_list': [{'golden_result': '在太空任务中,宇航员的日常生活和工作环境与地球上有很大不同。失重环境使得宇航员需要学会在空间站内移动和操作物体的新方法。此外,宇航员需要适应紧凑的生活空间、特殊的饮食和睡眠安排。在工作方面,宇航员需要执行各种实验项目、维修任务和其他与太空站运行相关的工作。'},
{'golden_result': '太空任务的日常生活和工作环境与地球上有很大不同。在国际空间站等太空环境中,宇航员需要适应失重状态,这意味着他们需要学会在没有重力的情况下进行日常活动,如进食、睡觉和个人卫生。此外,宇航员的工作时间通常安排得非常紧密,包括进行科学实验、维护空间站设备、进行舱外活动等。在太空中,宇航员需要与国际团队紧密合作,因此良好的沟通和团队协作能力至关重要。同时,宇航员还需要应对与地球隔离的心理压力,保持良好的心理状态。'},
{'golden_result': '太空任务的日常生活和工作环境与地球上有很大不同。在国际空间站等太空环境中,宇航员需要适应失重状态,这意味着他们在生活和工作时需要特殊的设备和方法。例如,宇航员需要使用特殊的睡袋固定在墙上睡觉,进食时要使用特殊的食品和饮料包装,以防止食物和液体在失重环境中漂浮。\n\n工作方面,宇航员需要执行各种任务,如进行科学实验、维护空间站设备、与地面控制中心保持联系等。此外,宇航员还需要进行定期的体能锻炼,以减轻失重环境对身体的负面影响。在太空中,宇航员需要与其他国家的宇航员紧密合作,共同完成任务,因此良好的团队协作和沟通能力至关重要。'},
{'golden_result': '太空任务的日常生活和工作环境与地球上有很大不同。在国际空间站等太空环境中,宇航员需要适应失重状态,这意味着他们在生活和工作时会漂浮。宇航员每天需要进行多项科学实验、维修任务和健身锻炼。由于太空中没有自然光周期,宇航员需要遵循严格的作息时间表以保持正常的生物钟。\n\n在太空中,宇航员需要面对有限的生活空间和资源。他们需要学会在紧凑的空间中进行日常活动,如睡觉、进食和卫生。此外,宇航员还需要定期与地面控制中心进行通信,报告任务进展和身体状况。总的来说,太空任务的日常生活和工作环境具有挑战性,但也为宇航员提供了独特的体验和成就感。'},
{'golden_result': '太空任务的日常生活和工作环境与地球上有很大不同。在国际空间站等太空环境中,宇航员需要适应失重状态,这意味着他们需要学会在没有重力的情况下进行日常活动,如进食、睡觉和个人卫生。此外,宇航员需要按照严格的时间表工作,进行科学实验、维修设备和保持空间站的正常运行。他们还需要定期进行锻炼,以防止失重环境对身体造成的负面影响。在太空中,宇航员与同伴共同生活和工作,因此良好的团队合作和沟通能力至关重要。'},
{'golden_result': '太空任务的日常生活和工作环境与地球上有很大不同。在国际空间站等太空环境中,宇航员需要适应失重状态,这意味着他们在生活和工作时都会漂浮。宇航员每天需要进行多项科学实验、维修设备和保持空间站的正常运行。\n\n在太空中,宇航员的作息时间与地球上相似,每天工作约8小时,休息8小时,剩余时间用于锻炼、进食和休闲活动。由于太空环境中没有自然光线,宇航员需要依靠人造光源来调整生物钟。\n\n太空中的饮食主要是预先加工和包装好的食物,宇航员需要通过特殊设备来加热和食用。此外,宇航员每天都需要进行约2小时的锻炼,以防止失重环境对身体造成的负面影响,如肌肉萎缩和骨密度减少。\n\n总的来说,太空任务的日常生活和工作环境具有挑战性,宇航员需要适应失重状态、保持身体健康并完成任务目标。'}],
'prompt_input': {'prompt': '你需要扮演一名专业的宇航员训练顾问,你必须遵循参考对话流程中的一个步骤回答用户,但不能给出其他任何步骤的回答。\n\n参考对话流程:\n1. 询问用户对太空探索或宇航员训练的兴趣。\n2. 解释成为宇航员所需的基本条件和技能。\n3. 概述宇航员的训练过程和挑战。\n4. 讨论太空任务的日常生活和工作环境。\n5. 提供相关的教育和训练资源信息。\n\n当前历史对话为:user: 你好,我对太空探索和宇航员训练很感兴趣。\nyou: 你好!很高兴你对太空探索和宇航员训练感兴趣。我是一名宇航员训练顾问,我可以回答你关于这方面的问题。\nuser: 请问成为宇航员需要具备哪些基本条件和技能?\nyou: 成为宇航员需要具备一定的基本条件和技能。首先,你需要拥有良好的身体素质,因为在太空中生活和工作需要承受极端环境。其次,你需要具备一定的教育背景,通常是在工程、科学、数学或计算机科学领域的学士学位。此外,宇航员还需要具备一定的飞行经验和团队合作能力。\nuser: 宇航员的训练过程和挑战是什么?\nyou: 宇航员的训练过程包括基本训练和任务训练两个阶段。基本训练主要包括生存训练、航天飞行器操作、空间行走训练等。任务训练则针对特定的太空任务,如科学实验、维修任务等。在训练过程中,宇航员需要面对许多挑战,如适应失重环境、应对紧急情况、进行高强度的体力和心理训练等。\n\n用户当前问题为:太空任务的日常生活和工作环境是怎样的?'}}
test的prompt input和train的input完全相同,且train的output就为test的第一个golden result
还有不少KAgentBench的query在KAgentInstruct中出现。
另外,#18 中的问题仍然存在
{"type": "chatml", "messages": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Answer the following questions as best you can. You have access to the following tools:\n\n['API Name: video-generation\nDescription: Generate a video describing the given text input.\nRequired Arguments: \n- text (string) : User input text\n', 'API Name: text-translation-zh2en\nDescription: Translate Chinese text input to English.\nRequired Arguments: \n- text (string) : User input Chinese text\n', 'API Name: image-generation\nDescription: Generate an image based on the provided text input.\nRequired Arguments: \n- text (string) : User input text\n']\n\nUse the following format:\n\nQuestion: the input question you must answer\nThought: you should always think about what to do\nAction: the action to take, should be one of [duckduckgo_search, Wikipedia, Calculator]\nAction Input: the input to the action\nObservation: the result of the action\n... (this Thought/Action/Action Input/Observation can repeat N times)\nThought: I now know the final answer\nFinal Answer: the final answer to the original input question\n\nBegin!\n\nQuestion: 对比两种舞蹈表演风格,阐述差异和现代化发展趋势。\nThought:"}
instrunction要求的 Action: the action to take, should be one of [duckduckgo_search, Wikipedia, Calculator]\n,并没有出现在给出的api里面存在矛盾
command:kagentsys --query="Who is Andy Lau's wife?" --llm_name="kagentlms_qwen_7b_mat"
--use_local_llm --local_llm_host="https://127.0.0.1" --local_llm_port=80 --lang="zh"
use_local_llm,error:
OSError: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like kwaikeg/kagentlms_qwen_7b_mat is not the path to a directory containing a file named config.json.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.
Will the local deployment service also download model files from Hugging Face?
Hi ! 我发现您最近开源了训练数据KAgentInstruct,感谢开源!
在训练数据ReACT方法这一类别中,我发现了下述问题:
prompt数据中定义的tools存在矛盾情况
Answer the following questions as best you can. You have access to the following tools:
[{'name': 'open_weather_map', 'description': 'A tool for fetching current weather information for a specified location. Input should be a location string (e.g. London,GB).', 'parameters': {'location': {'type': 'string', 'description': 'Location to search.', 'required': True}}}, {'name': 'query_powerbi', 'description': 'A tool for querying a dataset based on a detailed question input. It will try to answer the question using the dataset and, if it cannot, it will prompt for clarification.', 'parameters': {'tool_input': {'type': 'string', 'description': 'Detailed question to search.', 'required': False}}}, {'name': 'submit_file', 'description': 'A tool to submit a file once all steps are complete.', 'parameters': {}}, {'name': 'rewrite_sql', 'description': 'A tool for rewriting an input SQL query.', 'parameters': {'sql': {'type': 'string', 'description': 'The SQL query to rewrite.', 'required': True}}}, {'name': 'get_qa', 'description': 'A tool for answering questions based on an input text. Can be used to process text from an image.', 'parameters': {'input': {'type': 'string', 'description': 'The input text.', 'required': True}}}, {'name': 'check_availability', 'description': 'A tool for checking the availability of a property based on its ID.', 'parameters': {'propertyId': {'type': 'string', 'description': 'The ID of the property.', 'required': True}}}, {'name': 'sleep', 'description': 'A tool for making the agent sleep for a specified number of seconds.', 'parameters': {'sleep_time': {'type': 'number', 'description': 'The number of seconds to sleep.', 'required': True}}}, {'name': 'searx_search', 'description': 'A tool for meta-searching, useful for retrieving up-to-date information based on a search query.', 'parameters': {'query': {'type': 'string', 'description': 'The search query.', 'required': True}}}, {'name': 'get_elements', 'description': 'A tool for retrieving URL(s) based on a CSS selector and (optional) attribute(s).', 'parameters': {'selector': {'type': 'string', 'description': 'A CSS selector, such as "*", "div", "p", "a", #id, or .classname.', 'required': True}, 'attributes': {'type': 'array', 'description': 'An optional set of attributes to retrieve for each element.', 'items': {'type': 'string', 'description': 'An attribute to retrieve for each element'}, 'required': False}}}, {'name': 'rent_estimate', 'description': 'A tool for estimating rent for a specified property.', 'parameters': {'property_type': {'type': 'string', 'description': 'The type of the property (SingleFamily, Condo, MultiFamily, Townhouse, or Apartment).', 'required': True}, 'long': {'type': 'number', 'description': 'The longitude of the property.', 'required': True}, 'lat': {'type': 'number', 'description': 'The latitude of the property.', 'required': True}, 'd': {'type': 'number', 'description': 'The diameter in miles.', 'required': True}, 'beds': {'type': 'number', 'description': 'The number of bedrooms in the property.', 'required': True}, 'bath': {'type': 'number', 'description': 'The number of bathrooms in the property.', 'required': True}, 'sqftMin': {'type': 'number', 'description': 'The minimum square footage of the property.', 'required': True}, 'sqftMax': {'type': 'number', 'description': 'The maximum square footage of the property.', 'required': True}, 'address': {'type': 'string', 'description': 'The address of the property.', 'required': True}}}, {'name': 'no_function', 'description': 'A placeholder function indicating that no appropriate tool exists with the given parameters.', 'parameters': {}}]
Use the following format:
Question: the input question you must answer
Thought: you should always think about what to do
Action: the action to take, should be one of [duckduckgo_search, Wikipedia, Calculator]
Action Input: the input to the action
Observation: the result of the action
... (this Thought/Action/Action Input/Observation can repeat N times)
Thought: I now know the final answer
Final Answer: the final answer to the original input question
Begin!
Question: 请给我一些建筑设计方面的创意灵感
Thought:
例如上述例子中,定义的工具为:
[{'name': 'open_weather_map', 'description': 'A tool for fetching current weather information for a specified location. Input should be a location string (e.g. London,GB).', 'parameters': {'location': {'type': 'string', 'description': 'Location to search.', 'required': True}}}, {'name': 'query_powerbi', 'description': 'A tool for querying a dataset based on a detailed question input. It will try to answer the question using the dataset and, if it cannot, it will prompt for clarification.', 'parameters': {'tool_input': {'type': 'string', 'description': 'Detailed question to search.', 'required': False}}}, {'name': 'submit_file', 'description': 'A tool to submit a file once all steps are complete.', 'parameters': {}}, {'name': 'rewrite_sql', 'description': 'A tool for rewriting an input SQL query.', 'parameters': {'sql': {'type': 'string', 'description': 'The SQL query to rewrite.', 'required': True}}}, {'name': 'get_qa', 'description': 'A tool for answering questions based on an input text. Can be used to process text from an image.', 'parameters': {'input': {'type': 'string', 'description': 'The input text.', 'required': True}}}, {'name': 'check_availability', 'description': 'A tool for checking the availability of a property based on its ID.', 'parameters': {'propertyId': {'type': 'string', 'description': 'The ID of the property.', 'required': True}}}, {'name': 'sleep', 'description': 'A tool for making the agent sleep for a specified number of seconds.', 'parameters': {'sleep_time': {'type': 'number', 'description': 'The number of seconds to sleep.', 'required': True}}}, {'name': 'searx_search', 'description': 'A tool for meta-searching, useful for retrieving up-to-date information based on a search query.', 'parameters': {'query': {'type': 'string', 'description': 'The search query.', 'required': True}}}, {'name': 'get_elements', 'description': 'A tool for retrieving URL(s) based on a CSS selector and (optional) attribute(s).', 'parameters': {'selector': {'type': 'string', 'description': 'A CSS selector, such as "*", "div", "p", "a", #id, or .classname.', 'required': True}, 'attributes': {'type': 'array', 'description': 'An optional set of attributes to retrieve for each element.', 'items': {'type': 'string', 'description': 'An attribute to retrieve for each element'}, 'required': False}}}, {'name': 'rent_estimate', 'description': 'A tool for estimating rent for a specified property.', 'parameters': {'property_type': {'type': 'string', 'description': 'The type of the property (SingleFamily, Condo, MultiFamily, Townhouse, or Apartment).', 'required': True}, 'long': {'type': 'number', 'description': 'The longitude of the property.', 'required': True}, 'lat': {'type': 'number', 'description': 'The latitude of the property.', 'required': True}, 'd': {'type': 'number', 'description': 'The diameter in miles.', 'required': True}, 'beds': {'type': 'number', 'description': 'The number of bedrooms in the property.', 'required': True}, 'bath': {'type': 'number', 'description': 'The number of bathrooms in the property.', 'required': True}, 'sqftMin': {'type': 'number', 'description': 'The minimum square footage of the property.', 'required': True}, 'sqftMax': {'type': 'number', 'description': 'The maximum square footage of the property.', 'required': True}, 'address': {'type': 'string', 'description': 'The address of the property.', 'required': True}}}, {'name': 'no_function', 'description': 'A placeholder function indicating that no appropriate tool exists with the given parameters.', 'parameters': {}}]
但prompt中却说:
... ...
Action: the action to take, should be one of [duckduckgo_search, Wikipedia, Calculator]
... ...
我发现这好像是一种比较普遍的情况。
请问是否能上传更新版的训练数据?再次感谢您的开源,期待回复!
Traceback (most recent call last):
File "c:\users\user\desktop\kwaiagents-main\kwaiagents-main\kwaiagents\tools\search.py", line 119, in _retry_search_result
if not search_results and counter >= 2:
^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'search_results' where it is not associated with a value
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\user\desktop\kwaiagents-main\kwaiagents-main\kwaiagents\tools\search.py", line 119, in _retry_search_result
if not search_results and counter >= 2:
^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'search_results' where it is not associated with a value
请问下两个关于KAgentInstruct数据集的问题:
1、source为kwai-agent和kwaiagent的两部分数据有什么区别?
2、每行数据中的"llm_prompt_response"字段是个list,"llm_prompt_response"字段下的各个dict(每个dict中有“input”、“instruction”、“output”)在训练时需要合并到一个conversation中吗?(或者说"llm_prompt_response"字段下的各个dict是否独立且不需要考虑加入上下文)
感谢!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.