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

工具函数没有执行完成就终止了 #552

Open
yppgo opened this issue Mar 10, 2025 · 0 comments
Open

工具函数没有执行完成就终止了 #552

yppgo opened this issue Mar 10, 2025 · 0 comments

Comments

@yppgo
Copy link

yppgo commented Mar 10, 2025

task = Msg("Bob", '''
1.给你一个存储pdf文件的文件目录(C:/python项目/untitled/file),调用工具函数处理目录中的所有文本,将返回的列表元素处理成如下json格式
{
"申请号": "",
"公开日": "",
"公开号": "",
"申请日": "",
"申请人": "",
"申请人地址": "",
"发明人": "",
"摘要": ""
}
注意:摘要内容不要进行任何总结简化,直接放源文本内容
2.数据库中有一张如下的表
CREATE TABLE tb_patentInfo (
id INT AUTO_INCREMENT PRIMARY KEY,
application_number VARCHAR(20) NOT NULL,
publication_number VARCHAR(20),
publication_date DATE,
application_date DATE,
applicant_name VARCHAR(255),
applicant_address TEXT,
inventor_name VARCHAR(255),
abstract TEXT
);
调用插入函数将json数据记录插入到数据库当中,其中
host="127.0.0.1",
user="root",
password="root",
database="patent",
table_name="tb_patentinfo",
sql为你生成的插入语句,使用一条插入语句进行插入
注意:而不是多次调用插入函数
''', "user")
task2 = Msg("Bob", '''帮我读取C:/python项目/untitled/file目录下的所有文件的绝对路径
''', "user")
response = david(task) 这个是agent的提示词,任务没有执行完成就自动终止了,只执行到把文件变成json格式,没有插入数据库。
这种情况是对话token到了还是什么意思啊

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

1 participant