-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Ready] Translate tutorial into Chinese (#49)
Co-authored-by: ZiTao-Li <[email protected]> Co-authored-by: rayrayraykk <[email protected]> Co-authored-by: panxuchen.pxc <[email protected]> Co-authored-by: qbc <[email protected]>
- Loading branch information
1 parent
473d6c6
commit 0b4bf85
Showing
87 changed files
with
3,960 additions
and
764 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,32 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
# Makefile | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
SPHINXBUILD = sphinx-build | ||
SPHINXPROJ = AgentScope-Doc | ||
ASSETSDIR = assets | ||
BUILDDIR = build/html | ||
SOURCEDIR_EN = en/source | ||
BUILDDIR_EN = build/html/en | ||
SOURCEDIR_ZH = zh_CN/source | ||
BUILDDIR_ZH = build/html/zh_CN | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
# English document | ||
en: | ||
@$(SPHINXBUILD) -b html "$(SOURCEDIR_EN)" "$(BUILDDIR_EN)" | ||
@echo | ||
@echo "Build finished. The HTML pages are in $(BUILDDIR_EN)" | ||
|
||
.PHONY: help Makefile | ||
# Chinese document | ||
zh_CN: | ||
@$(SPHINXBUILD) -b html "$(SOURCEDIR_ZH)" "$(BUILDDIR_ZH)" | ||
@echo | ||
@echo "Build finished. The HTML pages are in $(BUILDDIR_ZH)" | ||
|
||
index: | ||
@cp "$(ASSETSDIR)/redirect.html" "$(BUILDDIR)/index.html" | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR_EN)" "$(BUILDDIR_EN)" $(O) | ||
|
||
all: en zh_CN index | ||
|
||
.PHONY: all en zh_CN index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="refresh" content="0; url=en/index.html" /> | ||
<title>AgentScope Documentation</title> | ||
</head> | ||
<body> | ||
<p>Redirecting to English documentation...</p> | ||
<p>If you are not redirected, <a href="en/index.html">click here</a>.</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.language-selector a { | ||
color: white; | ||
width: 20px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!-- language_selector.html --> | ||
<div class="language-selector"> | ||
<a href="{{ pathto('../en/index') }}">English</a></li> | | ||
<a href="{{ pathto('../zh_CN/index') }}">中文</a></li> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<!-- layout.html --> | ||
{% extends "!layout.html" %} {% block sidebartitle %} {{ super() }} {% include | ||
"language_selector.html" %} {% endblock %} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
(101-agentscope-en)= | ||
|
||
# About AgentScope | ||
|
||
In this tutorial, we will provide an overview of AgentScope by answering | ||
several questions, including what's AgentScope, what can AgentScope provide, | ||
and why we should choose AgentScope. Let's get started! | ||
|
||
## What is AgentScope? | ||
|
||
AgentScope is a developer-centric multi-agent platform, which enables | ||
developers to build their LLM-empowered multi-agent applications with less | ||
effort. | ||
|
||
With the advance of large language models, developers are able to build | ||
diverse applications. | ||
In order to connect LLMs to data and services and solve complex tasks, | ||
AgentScope provides a series of development tools and components for ease of | ||
development. | ||
It features | ||
|
||
- **usability**, | ||
- **robustness**, and | ||
- **the support of multi-modal data** and | ||
- **distributed deployment**. | ||
|
||
## Key Concepts | ||
|
||
### Message | ||
|
||
Message is a carrier of information (e.g. instructions, multi-modal | ||
data, and dialogue). In AgentScope, message is a Python dict subclass | ||
with `name` and `content` as necessary fields, and `url` as an optional | ||
field referring to additional resources. | ||
|
||
### Agent | ||
|
||
Agent is an autonomous entity capable of interacting with environment and | ||
agents, and taking actions to change the environment. In AgentScope, an | ||
agent takes message as input and generates corresponding response message. | ||
|
||
### Service | ||
|
||
Service refers to the functional APIs that enable agents to perform | ||
specific tasks. In AgentScope, services are categorized into model API | ||
services, which are channels to use the LLMs, and general API services, | ||
which provide a variety of tool functions. | ||
|
||
### Workflow | ||
|
||
Workflow represents ordered sequences of agent executions and message | ||
exchanges between agents, analogous to computational graphs in TensorFlow, | ||
but with the flexibility to accommodate non-DAG structures. | ||
|
||
## Why AgentScope? | ||
|
||
**Exceptional usability for developers.** | ||
AgentScope provides high usability for developers with flexible syntactic | ||
sugars, ready-to-use components, and pre-built examples. | ||
|
||
**Robust fault tolerance for diverse models and APIs.** | ||
AgentScope ensures robust fault tolerance for diverse models, APIs, and | ||
allows developers to build customized fault-tolerant strategies. | ||
|
||
**Extensive compatibility for multi-modal application.** | ||
AgentScope supports multi-modal data (e.g., files, images, audio and videos) | ||
in both dialog presentation, message transmission and data storage. | ||
|
||
**Optimized efficiency for distributed multi-agent operations.** AgentScope | ||
introduces an actor-based distributed mechanism that enables centralized | ||
programming of complex distributed workflows, and automatic parallel | ||
optimization. | ||
|
||
## How is AgentScope designed? | ||
|
||
The architecture of AgentScope comprises three hierarchical layers. The | ||
layers provide supports for multi-agent applications from different levels, | ||
including elementary and advanced functionalities of a single agent | ||
(**utility layer**), resources and runtime management (**manager and wrapper | ||
layer**), and agent-level to workflow-level programming interfaces (**agent | ||
layer**). AgentScope introduces intuitive abstractions designed to fulfill | ||
the diverse functionalities inherent to each layer and simplify the | ||
complicated interlayer dependencies when building multi-agent systems. | ||
Furthermore, we offer programming interfaces and default mechanisms to | ||
strengthen the resilience of multi-agent systems against faults within | ||
different layers. | ||
|
||
## AgentScope Code Structure | ||
|
||
```bash | ||
AgentScope | ||
├── src | ||
│ ├── agentscope | ||
│ | ├── agents # Core components and implementations pertaining to agents. | ||
│ | ├── memory # Structures for agent memory. | ||
│ | ├── models # Interfaces for integrating diverse model APIs. | ||
│ | ├── pipeline # Fundamental components and implementations for running pipelines. | ||
│ | ├── rpc # Rpc module for agent distributed deployment. | ||
│ | ├── service # Services offering functions independent of memory and state. | ||
| | ├── web # WebUI used to show dialogs. | ||
│ | ├── utils # Auxiliary utilities and helper functions. | ||
│ | ├── message.py # Definitions and implementations of messaging between agents. | ||
│ | ├── prompt.py # Prompt engineering module for model input. | ||
│ | ├── ... .. | ||
│ | ├── ... .. | ||
├── scripts # Scripts for launching local Model API | ||
├── examples # Pre-built examples of different applications. | ||
├── docs # Documentation tool for API reference. | ||
├── tests # Unittest modules for continuous integration. | ||
├── LICENSE # The official licensing agreement for AgentScope usage. | ||
└── setup.py # Setup script for installing. | ||
├── ... .. | ||
└── ... .. | ||
``` | ||
|
||
[[Return to the top]](#101-agentscope) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.