v3.2.0.1
New Feature:
-
[Agently Workflow]
We're glad to introduce a brand new feature of Agently v3.2 to you all:Agently Workflow
!With this new feature, you can arrange and manage your LLMs based application workflow in just 3 steps, simple and easy:
- Define and program your application logic into different workflow chunks;
- Connect chunks using
chunk.connect_to()
in orders; (Loop and condition judugment supported) - Start the workflow using
workflow.startup()
.
-
[Agent Component: Decorator]: @agent.tool(tool_info:dict={})
Now you can use
@agent.tool()
to decorate a function to register it as an agent's tool:@agent.tool() def get_current_date(): """Get current date""" return datetime.now().date().strftime("%Y-%B-%d")
You can also pass other parameters to
@agent.tool()
in the same way when usingagent.register_tool()
.
Update:
[Framework]
Updated inherit logic of settings and addis_debug
parameter to.create_agent()
;[Agent Component: Role]
Change.set_role_name()
to.set_role_id()
and the role id will not be passed to agent request now;[Facility: RoleManager]
Change.set_name()
to.set_id()
;[Agent Component: Tool]
Update tool using prompt;
Bug Fix:
[Agent Component: Segment]
Clean segments' prompt cache at an earlier time and add try except logic to avoid unclean runtime cause error;
全新功能:
-
[Agently Workflow]
我们非常高兴能够向您介绍Agently v3.2版本推出的全新功能:Agently Workflow!
使用这项全新的功能,只需要一二三步走,您就能够轻松惬意地编排管理您的语言模型应用工作流了:
- 在workflow chunks切块中编写您的应用工作流中的单块工作逻辑(如输入、判断、请求执行、数据存取等);
- 使用
chunk.connect_to()
方法将切块按您想要的工作顺序进行连接(支持环状连接、条件分支等复杂连接关系); - 通过
workflow.startup()
开始运行工作流。
功能案例:点击查看案例,了解新功能的用法
-
[Agent Component: Decorator]: @agent.tool(tool_info:dict={})
现在,您可以使用
@agent.tool()
装饰器来将一个函数注册给Agent使用了,具体用法如下:@agent.tool() def get_current_date(): """Get current date""" return datetime.now().date().strftime("%Y-%B-%d")
您可以向
@agent.tool()
传递其他参数,参数要求和agent.register_tool()
方法保持一致。
重要更新
[框架核心]
改善了一些框架内的settings
设置项的继承逻辑,并且支持向.create_agent()
传递is_debug
参数了;[Agent能力组件:Role]
将.set_role_name()
方法更改为.set_role_id()
方法,使其和业务表达解耦,同时,设置的role id将不会在agent请求模型时被传递过去,只作为代码编写时的agent身份标识;[公共设施插件: RoleManager]
与上条相同,将.set_name()
方法更改为.set_id()
;[Agent能力组件:Tool]
更新了部分工具调用的提示词,优化Tool插件的工作质量;
问题修复
[Agent能力组件:Segment]
在更早的时机清除Segments的提示词设置缓存,并添加了一段错误监听逻辑,以在运行出错时能够将当前的Segments设置清除,避免干扰下一次运行(尤其是在Colab环境中)。