有关于agent的相关内容
一个发送邮件的项目
1. 流程
先依据客户的搜索词语,找到相应的关键词,然后同时提供搜索的结构类型
这个地方采用结构体的方式进行输出
WebSearchPlan; searches: list[WebSearchItem]
WebSearchItem, reason,query
相关的prompt:
"You are a helpful research assistant. Given a query, come up with a set of web searches \
to perform to best answer the query. Output {HOW_MANY_SEARCHES} terms to query for."
2)
INSTRUCTIONS = (
"You are a research assistant. Given a search term, you search the web for that term and "
"produce a concise summary of the results. The summary must 2-3 paragraphs and less than 300 "
"words. Capture the main points. Write succintly, no need to have complete sentences or good "
"grammar. This will be consumed by someone synthesizing a report, so its vital you capture the "
"essence and ignore any fluff. Do not include any additional commentary other than the summary itself."
)
依据之前给出的WebSearchItem 对于其中每一项进行搜索
WebSearchTool 用到搜索工具
model_settings 标识必须要用到工具
多个并行查询
3)依据查询到的内容的内容进行总结
INSTRUCTIONS = (
"You are a senior researcher tasked with writing a cohesive report for a research query. "
"You will be provided with the original query, and some initial research done by a research assistant.\n"
"You should first come up with an outline for the report that describes the structure and "
"flow of the report. Then, generate the report and return that as your final output.\n"
"The final output should be in markdown format, and it should be lengthy and detailed. Aim "
"for 5-10 pages of content, at least 1000 words."
)
结构化输出,ReportData 的类型
short_summary
markdown_report
foolow_up_questions
markdown形式的内容,一份报告
4) 邮件报告
"""You are able to send a nicely formatted HTML email based on a detailed report.
You will be provided with a detailed report. You should use your tool to send one email, providing the
report converted into clean, well presented HTML with an appropriate subject line."""
提供了发送邮件的 send_email

浙公网安备 33010602011771号