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

[Doc][ChatKnowledge] Does the knowledge base support background batch import? #1648

Open
1 of 2 tasks
S0uLHun43r opened this issue Jun 20, 2024 · 2 comments
Open
1 of 2 tasks
Labels
documentation Improvements or additions to documentation Waiting for reply

Comments

@S0uLHun43r
Copy link

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

我在老版本的issue里面看到似乎存在以下方法:
1.将个人知识文件或者文件夹放入pilot/datasets目录中
...
3.在tools目录执行知识入库脚本()
如果是选择默认知识库,不需要指定 --vector_name, 默认default
python tools/knowledge_init.py
如果选择新增知识库,在界面上新增知识库输入你的知识库名,
python tools/knowledge_init.py --vector_name = yourname
--vector_name: vector_name default_value:default
就可以根据你的知识库进行问答

但是新版本没有在文档里发现相关方法,文件也已经删除了,请问有其他办法可以从后台导入多个文件吗,文件数量比较多。

Documentation Links

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@S0uLHun43r S0uLHun43r added documentation Improvements or additions to documentation Waiting for reply labels Jun 20, 2024
@S0uLHun43r
Copy link
Author

使用如下方法进行导入,出现以下报错:
dbgpt knowledge load --space_name 'test' --local_doc_path /data/DB-GPT-main/pilot/datasets/ --vector_store_type Chroma
id=None name='test' vector_type='Chroma' desc='DB-GPT cli' owner='DB-GPT'
Traceback (most recent call last):
File "/usr/local/python3/bin/dbgpt", line 8, in
sys.exit(main())
File "/data/DB-GPT-main/dbgpt/cli/cli_scripts.py", line 219, in main
return cli()
File "/usr/local/python3/lib/python3.10/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/usr/local/python3/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/usr/local/python3/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/python3/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/python3/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/python3/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/data/DB-GPT-main/dbgpt/app/knowledge/_cli/knowledge_cli.py", line 45, in wrapper
return func(*args, **kwargs)
File "/data/DB-GPT-main/dbgpt/app/knowledge/_cli/knowledge_cli.py", line 135, in load
knowledge_init(
File "/data/DB-GPT-main/dbgpt/app/knowledge/_cli/knowledge_client.py", line 127, in knowledge_init
client.space_add(space)
File "/data/DB-GPT-main/dbgpt/app/knowledge/_cli/knowledge_client.py", line 63, in space_add
raise e
File "/data/DB-GPT-main/dbgpt/app/knowledge/_cli/knowledge_client.py", line 58, in space_add
return self._post("/knowledge/space/add", data=request)
File "/data/DB-GPT-main/dbgpt/app/knowledge/_cli/knowledge_client.py", line 48, in _post
return self._handle_response(response)
File "/data/DB-GPT-main/dbgpt/app/knowledge/_cli/knowledge_client.py", line 38, in _handle_response
raise Exception(
Exception: Http request error, code: 400, message: {"success":false,"err_code":"E0001","err_msg":"body.id:Input should be a valid integer;","data":null}

@Aries-ckt
Copy link
Collaborator

sorry about that , we will support knowledge client upload directory soon.

@Aries-ckt Aries-ckt changed the title [Doc][知识库] 知识库是否支持后台批量导入 [Doc][ChatKnowledge] Does the knowledge base support background batch import? Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation Waiting for reply
Projects
None yet
Development

No branches or pull requests

2 participants