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

关于数据库的更新问题 #196

Open
mymoonsoft opened this issue Nov 21, 2024 · 1 comment
Open

关于数据库的更新问题 #196

mymoonsoft opened this issue Nov 21, 2024 · 1 comment

Comments

@mymoonsoft
Copy link

from agentuniverse.base.agentuniverse import AgentUniverse
from agentuniverse.agent.action.knowledge.knowledge_manager import KnowledgeManager

if name == 'main':
AgentUniverse().start(config_path='config/config.toml', core_mode=True)
civil_store_list = ["civil_law_sqlite_store", "civil_law_chroma_store"]
#criminal_store_list = ["criminal_law_sqlite_store", "criminal_law_chroma_store"]
law_knowledge = KnowledgeManager().get_instance_obj("law_knowledge")

law_knowledge.insert_knowledge(
    source_path=r"D:\myvitual\agentUniverse\sample_standard_app\app\resources\111p.pdf",
    stores=civil_store_list
)

请问题我运行这段代码后,原STORE 是清空了,还是新内容插进去了,提示是Knowledge insert complete

另外我还想问一下,如果我要清空原数据库,如何操作?新建数据库的代码可否提供一下?
@AniviaTn
Copy link
Collaborator

insert是插入了新内容。 清空的话如果是示例代码这个store的话您可以直接把db文件夹下的内容全部删除就可以了,这里用的是本地数据库。

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

2 participants