Skip to content

Commit

Permalink
Merge pull request #20 from alipay/dev
Browse files Browse the repository at this point in the history
feat: release version 0.0.5
  • Loading branch information
LandJerry authored May 8, 2024
2 parents 1acd543 + 7c0b1e6 commit bf1d0e3
Show file tree
Hide file tree
Showing 65 changed files with 592 additions and 241 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,23 @@ Deprecated - Soon to be deprecated features.
Removed - Features removed in this version.
Fixed - Any bug fixes.
Security - Patches and security improvements.
Note - Additional remarks regarding the version.

***************************************************

# Version Update History
## [0.0.5] - 2024-05-08
### Added
- The LLM component supports streaming calls.
- The Knowledge component has an added update definition.

### Fixed
- Fixed potential concurrency safety issues in the peer planner.
- Fixed the issue in version 0.0.4 of the PyPI package where the packaging method forced users to enter an AK upon startup.

### Note
- Some code optimizations and documentation updates.

## [0.0.4] - 2024-04-26
### Added
- Add version management capability to the prompt.
Expand All @@ -32,6 +45,9 @@ Security - Patches and security improvements.
* Due to compatibility issues of Gunicorn with Windows systems, automatically identify the kernel version to select the web startup method.
* Specified YAML reading as UTF-8 encoding method.

### Note
- [2024-05-08] Please be aware that the PyPI package version 0.0.4 includes the sample_standard_app example project by default. This will reference additional components from sample_standard_app at startup and require users to input an AK. If you are not using the corresponding components, you can bypass this restriction by using a mock AK. This issue has been fixed in version 0.0.5.

## [0.0.3] - 2024-04-19
### Init
- The official release version of AgentUniverse has been initialized. Enjoy using it!
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,23 @@ Deprecated - 即将废弃的功能。
Removed - 现版本中移除的功能。
Fixed - 任何错误修复。
Security - 补丁与安全改进。
Note - 对于版本的额外说明。

***************************************************

# 版本更新记录
## [0.0.5] - 2024-05-08
### Added
- LLM组件支持流式调用
- 知识组件添加update定义

### Fixed
- 修复peer planner中可能存在的并发安全性隐患
- 修复0.0.4版本中pypi package打包方式导致启动强制要求用户填写AK问题

### Note
- 追加部分代码优化与文档更新

## [0.0.4] - 2024-04-26
### Added
- 新增prompt版本管理能力
Expand All @@ -31,6 +44,8 @@ Security - 补丁与安全改进。
- Windows版本下的兼容问题修复
* 由于Gunicore对于windows系统的兼容问题,自动识别内核版本自动选择web启动方式
* yaml读取指定为utf-8 encode方式
### Note
- [2024-05-08] 注意,0.0.4的pypi package版本中默认包含了sample_standard_app示例工程, 这将会在启动时引用sample_standard_app中的额外组件,并要求用户填写AK, 若您没有使用对应组件可以通过mock ak跳过这一限制, 这已经在0.0.5版本中修复。

## [0.0.3] - 2024-04-19
### Init
Expand Down
13 changes: 13 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
include CHANGELOG.md
include CHANGELOG_zh.md
include LICENSE
include README.md
include README_zh.md
include requirements.txt
include MANIFEST.in
recursive-exclude docs *
recursive-exclude sample_standard_app *
recursive-exclude tests *
global-exclude __pycache__
global-exclude *.log
global-exclude *.pyc
2 changes: 2 additions & 0 deletions agentuniverse/agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# @FileName: agent.py
"""The definition of agent paradigm."""
from abc import abstractmethod
from datetime import datetime
from typing import Optional

from agentuniverse.agent.agent_model import AgentModel
Expand Down Expand Up @@ -104,6 +105,7 @@ def pre_parse_input(self, input_object) -> dict:
planner_input = dict()
planner_input['chat_history'] = input_object.get_data('chat_history') or ''
planner_input['background'] = input_object.get_data('background') or ''
planner_input['date'] = datetime.now().strftime('%Y-%m-%d')

self.parse_input(input_object, planner_input)
return planner_input
Expand Down
7 changes: 7 additions & 0 deletions agentuniverse/agent/default/executing_agent/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# !/usr/bin/env python3
# -*- coding:utf-8 -*-

# @Time : 2024/5/7 14:34
# @Author : wangchongshi
# @Email : [email protected]
# @FileName: __init__.py.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ instruction: |
背景信息是:
{background}
今天的日期是: {date}
开始!
我的问题是: {input}
Expand All @@ -28,4 +30,4 @@ instruction: |
让我们一步一步来。
metadata:
type: 'PROMPT'
version: 'executing_planner.default_cn'
version: 'default_executing_agent.cn'
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ instruction: |
Background Information:
{background}
Today's date is: {date}
Let's begin!
My question is: {input}
Expand All @@ -28,4 +30,4 @@ instruction: |
Let's take it step by step.
metadata:
type: 'PROMPT'
version: 'executing_planner.default_en'
version: 'default_executing_agent.en'
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def parse_input(self, input_object: InputObject, planner_input: dict) -> dict:
"""
planner_input['input'] = input_object.get_data('input')
planner_input['framework'] = input_object.get_data('planning_result').get_data('framework')
self.agent_model.profile.setdefault('prompt_version', 'default_executing_agent.cn')
return planner_input

def parse_result(self, planner_result: dict) -> dict:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ info:
name: 'ExecutingAgent'
description: 'executing agent'
profile:
prompt_version:
llm_model:
name: 'default_openai_llm'
model_name: 'gpt-3.5-turbo'
Expand All @@ -15,5 +14,5 @@ memory:
action:
metadata:
type: 'AGENT'
module: 'agentuniverse.agent.default.executing_agent'
module: 'agentuniverse.agent.default.executing_agent.executing_agent'
class: 'ExecutingAgent'
7 changes: 7 additions & 0 deletions agentuniverse/agent/default/expressing_agent/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# !/usr/bin/env python3
# -*- coding:utf-8 -*-

# @Time : 2024/5/7 14:35
# @Author : wangchongshi
# @Email : [email protected]
# @FileName: __init__.py.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ instruction: |
背景信息是:
{background}
今天的日期是: {date}
开始!
必须使用中文回答用户提出的问题。
需要回答的问题是: {input}
--------------------------------------------------------------
请根据规则要求做出回答。
metadata:
type: 'PROMPT'
version: 'expressing_planner.default_cn'
version: 'default_expressing_agent.cn'
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ instruction: |
Background information:
{background}
Today's date is: {date}
Let's begin!
You must answer user questions in English.
The question that needs answering is: {input}
--------------------------------------------------------------
Please provide your response according to to these rules.
metadata:
type: 'PROMPT'
version: 'expressing_planner.default_en'
version: 'default_expressing_agent.en'
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def parse_input(self, input_object: InputObject, planner_input: dict) -> dict:
"""
planner_input['input'] = input_object.get_data('input')
planner_input['background'] = self.build_background(input_object)
self.agent_model.profile.setdefault('prompt_version', 'default_expressing_agent.cn')
return planner_input

def parse_result(self, planner_result: dict) -> dict:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ info:
name: 'ExpressingAgent'
description: 'expressing agent'
profile:
prompt_version:
llm_model:
name: 'default_openai_llm'
model_name: 'gpt-3.5-turbo'
Expand All @@ -14,5 +13,5 @@ memory:
name: ''
metadata:
type: 'AGENT'
module: 'agentuniverse.agent.default.expressing_agent'
module: 'agentuniverse.agent.default.expressing_agent.expressing_agent'
class: 'ExpressingAgent'
7 changes: 7 additions & 0 deletions agentuniverse/agent/default/peer_agent/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# !/usr/bin/env python3
# -*- coding:utf-8 -*-

# @Time : 2024/5/7 14:35
# @Author : wangchongshi
# @Email : [email protected]
# @FileName: __init__.py.py
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ plan:
reviewing: 'ReviewingAgent'
metadata:
type: 'AGENT'
module: 'agentuniverse.agent.default.peer_agent'
module: 'agentuniverse.agent.default.peer_agent.peer_agent'
class: 'PeerAgent'
7 changes: 7 additions & 0 deletions agentuniverse/agent/default/planning_agent/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# !/usr/bin/env python3
# -*- coding:utf-8 -*-

# @Time : 2024/5/7 14:36
# @Author : wangchongshi
# @Email : [email protected]
# @FileName: __init__.py.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ instruction: |
背景信息是:
{background}
今天的日期是: {date}
开始!
必须使用中文回答用户提出的问题。
需要回答的问题是: {input}
metadata:
type: 'PROMPT'
version: 'planning_planner.default_cn'
version: 'default_planning_agent.cn'
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ instruction: |
Background information is.
{background}
Today's date is: {date}
Start!
You must answer user questions in English.
The question that needs to be answered is: {input}
metadata:
type: 'PROMPT'
version: 'planning_planner.default_en'
version: 'default_planning_agent.en'
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def parse_input(self, input_object: InputObject, planner_input: dict) -> dict:
"""
planner_input['input'] = input_object.get_data('input')
planner_input['expert_framework'] = input_object.get_data('expert_framework')
self.agent_model.profile.setdefault('prompt_version', 'default_planning_agent.cn')
return planner_input

def parse_result(self, planner_result: dict) -> dict:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ info:
name: 'PlanningAgent'
description: 'planning agent'
profile:
prompt_version:
llm_model:
name: 'default_openai_llm'
model_name: 'gpt-3.5-turbo'
Expand All @@ -14,5 +13,5 @@ memory:
name: ''
metadata:
type: 'AGENT'
module: 'agentuniverse.agent.default.planning_agent'
module: 'agentuniverse.agent.default.planning_agent.planning_agent'
class: 'PlanningAgent'
7 changes: 7 additions & 0 deletions agentuniverse/agent/default/rag_agent/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# !/usr/bin/env python3
# -*- coding:utf-8 -*-

# @Time : 2024/5/7 14:35
# @Author : wangchongshi
# @Email : [email protected]
# @FileName: __init__.py.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ instruction: |
背景信息是:
{background}
今天的日期是: {date}
开始!
需要回答的问题是: {input}
metadata:
type: 'PROMPT'
version: 'rag_planner.default_cn'
version: 'default_rag_agent.cn'
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ instruction: |
Background information:
{background}
Today's date is: {date}
Let's get started!
The question that needs to be answered is: {input}
metadata:
type: 'PROMPT'
version: 'rag_planner.default_en'
version: 'default_rag_agent.en'
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def parse_input(self, input_object: InputObject, planner_input: dict) -> dict:
"""
input = input_object.get_data('input')
planner_input['input'] = input
self.agent_model.profile.setdefault('prompt_version', 'default_rag_agent.cn')
return planner_input

def parse_result(self, planner_result: dict) -> dict:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ info:
name: 'rag_agent'
description: 'rag agent'
profile:
prompt_version:
llm_model:
name: 'default_openai_llm'
model_name: 'gpt-4'
Expand All @@ -11,5 +10,5 @@ plan:
name: 'rag_planner'
metadata:
type: 'AGENT'
module: 'agentuniverse.agent.default.rag_agent'
module: 'agentuniverse.agent.default.rag_agent.rag_agent'
class: 'RagAgent'
7 changes: 7 additions & 0 deletions agentuniverse/agent/default/reviewing_agent/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# !/usr/bin/env python3
# -*- coding:utf-8 -*-

# @Time : 2024/5/7 14:44
# @Author : wangchongshi
# @Email : [email protected]
# @FileName: __init__.py.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ instruction: |
背景信息是:
{background}
今天的日期是: {date}
开始!
必须使用中文回答用户提出的问题。
指定的问题是: {input}
给出的答案是: {expressing_result}
metadata:
type: 'PROMPT'
version: 'reviewing_planner.default_cn'
version: 'default_reviewing_agent.cn'
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ instruction: |
Background information:
{background}
Today's date is: {date}
Let's begin!
You must answer user questions in English.
The specified question is: {input}
The provided answer is: {expressing_result}
metadata:
type: 'PROMPT'
version: 'reviewing_planner.default_en'
version: 'default_reviewing_agent.en'
Loading

0 comments on commit bf1d0e3

Please sign in to comment.