Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyushuo committed Oct 24, 2024
2 parents f5238cb + 872ffb6 commit 630908a
Show file tree
Hide file tree
Showing 18 changed files with 636 additions and 124 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
English | [**中文**](https://github.com/modelscope/agentscope/blob/main/README_ZH.md)
English | [**中文**](https://github.com/modelscope/agentscope/blob/main/README_ZH.md) | [**日本語**](https://github.com/modelscope/agentscope/blob/main/README_JA.md)

# AgentScope

Expand Down
396 changes: 396 additions & 0 deletions README_JA.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README_ZH.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[English](https://github.com/modelscope/agentscope/blob/main/README.md) | 中文
[English](https://github.com/modelscope/agentscope/blob/main/README.md) | 中文 | [日本語](https://github.com/modelscope/agentscope/blob/main/README_JA.md)

# AgentScope

Expand Down
1 change: 1 addition & 0 deletions docs/sphinx_doc/zh_CN/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ AgentScope 文档
agentscope.service
agentscope.rpc
agentscope.server
agentscope.environment
agentscope.web
agentscope.prompt
agentscope.utils
2 changes: 1 addition & 1 deletion docs/sphinx_doc/zh_CN/source/tutorial/206-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ AgentScope内置策略的目标是**使初学者能够顺利调用模型API ,

## 构建提示面临的挑战

在多智能体应用中,LLM通常在对话中扮演不同的角色。当使用模型的Chat API时,时长会面临以下挑战
在多智能体应用中,LLM通常在对话中扮演不同的角色。当使用模型的Chat API时,时常会面临以下挑战

1. 大多数Chat类型的模型API是为聊天机器人场景设计的,`role`字段只支持`"user"``"assistant"`,不支持`name`字段,即API本身不支持角色扮演。

Expand Down
7 changes: 6 additions & 1 deletion examples/environments/chatroom/chatroom_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ def main(args: argparse.Namespace) -> None:
),
role="system",
)
r = ChatRoom(name="chat", announcement=ann, model_config_name=YOUR_MODEL_CONFIGURATION_NAME, to_dist=args.use_dist)
r = ChatRoom(
name="chat",
announcement=ann,
model_config_name=YOUR_MODEL_CONFIGURATION_NAME,
to_dist=args.use_dist,
)

# Setup the persona of Alice, Bob and Carol
alice = ChatRoomAgent( # Game Art Designer
Expand Down
19 changes: 9 additions & 10 deletions examples/environments/chatroom/chatroom_with_assistant_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ def main(args: argparse.Namespace) -> None:

bob = ChatRoomAgentWithAssistant(
name="Bob",
sys_prompt=r"""You are Bob's chat room assistant and he is """
sys_prompt=r"""You are Bob's chat room assistant and Bob is """
r"""currently unable to reply to messages. Please generate a """
r"""suitable response based on the following chat history. """
r"""The content you reply to must be based on the chat history. """
r"""Please refuse to reply to questions that are beyond the scope """
r"""of the chat history.""",
r"""suitable response based on the following chat history without """
r"""reasoning. The content you reply to must be based on the chat """
r"""history. Please refuse to reply to questions that are beyond """
r"""the scope of the chat history.""",
model_config_name=YOUR_MODEL_CONFIGURATION_NAME,
to_dist=args.use_dist,
timeout=args.timeout,
Expand Down Expand Up @@ -176,11 +176,10 @@ def main(args: argparse.Namespace) -> None:
# Setup the persona of Carol
carol = ChatRoomAgent(
name="Carol",
sys_prompt=r"""You are Carol, and now you need to interview Bob. """
r"""Just ask him where he is from, which school he graduated from, """
r"""his profession, and his hobbies. At the end of the interview, """
r"""please output a reply containing Goodbye to indicate the end """
r"""of the conversation.""",
sys_prompt="""You are Carol, and now you need to interview Bob. """
"""Just ask him where he is from, which school he graduated from, """
"""his profession, and his hobbies. You'd better only ask one """
"""question at a time.""",
model_config_name=YOUR_MODEL_CONFIGURATION_NAME,
to_dist=args.use_dist,
)
Expand Down
Loading

0 comments on commit 630908a

Please sign in to comment.