雷达智富

首页 > 内容 > 程序笔记 > 正文

程序笔记

开源免费的AI新闻汇总报告生成器Agently-Daily-News-Collector使用教程

2024-06-22 98

Agently新闻汇总报告生成器是一个基于Agently AI应用开发框架开发的应用项目。本项目构建了基于大语言模型驱动的全自动工作流,能够根据用户输入的主题关键词,自动完成新闻汇总报告的结构设计、栏目组稿(含新闻检索、筛查、总结、栏目信息撰写)及报告MarkDown格式文件的输出全过程。同时,本项目完全开源,欢迎开发者们通过Fork->PR的方式共同优化。

Agently 新闻汇总报告生成器 GitHub地址:https://github.com/AgentEra/Agently-Daily-News-Collector/tree/main

如何使用 Agently-Daily-News-Collector

第一步:将本仓库Clone到本地

在您的开发目录中使用以下Shell脚本指令:

git clone git@github.com:AgentEra/Agently-Daily-News-Collector.git

第二步:修改SETTINGS.yaml设置文件

你可以在Clone到本地的项目文件夹中找到SETTINGS.yaml这个文件,再根据您的需要修改其中的设置项即可。

下面是具体的设置项说明:

# Debug Settings
IS_DEBUG: false # 如果此项为true,将会输出更多执行过程信息,包括搜索和模型请求的明细信息
# Proxy Settings
PROXY: http://127.0.0.1:7890 # 项目中的搜索和模型请求可能会需要使用前向代理,可以通过此项设置代理信息
# Model Settings
MODEL_PROVIDER: OAIClient #默认使用OpenAI格式的兼容客户端,此客户端能够适配OpenAI以及各类兼容OpenAI格式的本地模型
MODEL_URL: http://base_url_path # 如果您需要修改Base URL,使用此项进行设置
MODEL_AUTH:
  api_key: "" # 在这里输入鉴权用的API-Key信息
MODEL_OPTIONS: # 在这里指定模型需要的其他参数,如指定具体的模型,或是调整temperture
  model: gpt-3.5-turbo
  temperture: 0.8
# Application Settings
MAX_COLUMN_NUM: 3 # 在这里设置汇总报告结构中的专栏数量 
OUTPUT_LANGUAGE: Chinese # 在这里设置汇总报告的输出语种,默认为英语,您可能需要手动改成中文
MAX_SEARCH_RESULTS: 8 # 在这里设置每个栏目搜索的最大结果数量
# 注意,如果数量设置过大,可能会导致超出模型的处理窗口大小,请根据模型具体情况设置
SLEEP_TIME: 5 # 在这里设置每次模型请求后的等待时间,以防止频繁请求导致模型拒绝访问

如果你想要了解切换其他模型的更多细节,可以阅读Agently官方网站关于模型设置的说明页面。

第三步:启动任务

因为本项目为Python项目,您需要在本地安装Python环境。您可以在Python官方网站找到适合您的安装方法。

然后,在你的项目目录下使用以下Shell脚本指令更新项目依赖包:

pip install -r requirements.txt

依赖包安装完毕后,通过以下Shell脚本指令即可启动:

python app.py

随后你会看到一个提示:[Please input the topic of your daily news collection]:。

根据提示输入你想要汇总的新闻领域主题关键词,或是用一句话描述您想要生成什么样的新闻汇总报告,然后任务就会开始自动运行了。在这里,你可以输入任何语种的内容,但生成内容的语种会和您在第二步中的设置的语种要求相同。

接下来就可以等待运行的结果了,整个过程大约需要5-8分钟。

在运行的过程中,会看到类似下面展示的输出日志,这些日志将帮助你了解当前在处理的任务,以及运行的关键进展情况:

2024-05-02 22:44:27,347 [INFO]  [Outline Generated] {'report_title': "Today's news about AI Models Appliaction", 'column_list': [{'column_title': 'Latest News', 'column_requirement': 'The content is related to AI Models Appliaction, and the time is within 24 hours', 'search_keywords': 'AI Models Appliaction news latest'}, {'column_title': 'Hot News', 'column_requirement': 'The content is related to AI Models Appliaction, and the interaction is high', 'search_keywords': 'AI Models Appliaction news hot'}, {'column_title': 'Related News', 'column_requirement': 'The content is related to AI Models Appliaction, but not news', 'search_keywords': 'AI Models Appliaction report'}]}
2024-05-02 22:44:32,352 [INFO]  [Start Generate Column] Latest News
2024-05-02 22:44:34,132 [INFO]  [Search News Count] 8
2024-05-02 22:44:46,062 [INFO]  [Picked News Count] 2
2024-05-02 22:44:46,062 [INFO]  [Summarzing]    With Support from AWS, Yseop Develops a Unique Generative AI Application for Regulatory Document Generation Across BioPharma
2024-05-02 22:44:52,579 [INFO]  [Summarzing]    Success
2024-05-02 22:44:57,580 [INFO]  [Summarzing]    Over 500 AI models are now optimised for Core Ultra processors, says Intel
2024-05-02 22:45:02,130 [INFO]  [Summarzing]    Success
2024-05-02 22:45:19,475 [INFO]  [Column Data Prepared]  {'title': 'Latest News', 'prologue': 'Stay up-to-date with the latest advancements in AI technology with these news updates: [Yseop Partners with AWS to Develop Generative AI for BioPharma](https://finance.yahoo.com/news/support-aws-yseop-develops-unique-130000171.html) and [Intel Optimizes Over 500 AI Models for Core Ultra Processors](https://www.business-standard.com/technology/tech-news/over-500-ai-models-are-now-optimised-for-core-ultra-processors-says-intel-124050200482_1.html).', 'news_list': [{'url': 'https://finance.yahoo.com/news/support-aws-yseop-develops-unique-130000171.html', 'title': 'With Support from AWS, Yseop Develops a Unique Generative AI Application for Regulatory Document Generation Across BioPharma', 'summary': "Yseop utilizes AWS to create a new Generative AI application for the Biopharma sector. This application leverages AWS for its scalability and security, and it allows Biopharma companies to bring pharmaceuticals and vaccines to the market more quickly. Yseop's platform integrates LLM models for generating scientific content while meeting the security standards of the pharmaceutical industry.", 'recommend_comment': 'AWS partnership helps Yseop develop an innovative Generative AI application for the BioPharma industry, enabling companies to expedite the delivery of pharmaceuticals and vaccines to market. The integration of LLM models and compliance with stringent pharmaceutical industry security standards make this a valuable solution for BioPharma companies.'}, {'url': 'https://www.business-standard.com/technology/tech-news/over-500-ai-models-are-now-optimised-for-core-ultra-processors-says-intel-124050200482_1.html', 'title': 'Over 500 AI models are now optimised for Core Ultra processors, says Intel', 'summary': 'Intel stated over 500 AI models are optimized for Core Ultra processors. These models are accessible from well-known sources like OpenVINO Model Zoo, Hugging Face, ONNX Model Zoo, and PyTorch.', 'recommend_comment': "Intel's optimization of over 500 AI models for Core Ultra processors provides access to a vast selection of pre-trained models from reputable sources. This optimization enhances the performance and efficiency of AI applications, making it easier for developers to deploy AI solutions on Intel-based hardware."}]}

第四步:得到一份新鲜出炉的新闻汇总报告!

在整个处理过程结束时,你将会看到类似下方的提示,并可以看到完整的报告MarkDown格式结果被输出到屏幕上:

2024-05-02 21:57:20,521 [INFO] [Markdown Generated]

同时,你也可以在你的项目文件夹中找到一份命名格式为<汇总报告名称> <生成日期>.md的文件。

更新于:5个月前
赞一波!2

文章评论

评论问答