Skip to content

Commit

Permalink
rename (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
sijunhe authored Jan 10, 2024
1 parent a77a311 commit a669ce7
Show file tree
Hide file tree
Showing 16 changed files with 37 additions and 35 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<div align="center">

<h1>ERNIE Bot SDK</h1>
<h1>ERNIE SDK</h1>

[开发文档](http://ernie-bot-agent.readthedocs.io/) | [智能体应用体验](https://aistudio.baidu.com/application/center?tag=agent)

[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](LICENSE)
[![Version](https://img.shields.io/github/release/PaddlePaddle/ERNIE-Bot-SDK.svg)](https://github.com/PaddlePaddle/ERNIE-Bot-SDK/releases)
[![Version](https://img.shields.io/github/release/PaddlePaddle/ERNIE-SDK.svg)](https://github.com/PaddlePaddle/ERNIE-SDK/releases)
![Supported Python versions](https://img.shields.io/badge/python-3.8+-orange.svg)
![Supported OSs](https://img.shields.io/badge/os-linux%2C%20win%2C%20mac-yellow.svg)
[![Downloads](https://pepy.tech/badge/erniebot-agent)](https://pepy.tech/project/erniebot-agent)
[![codecov](https://codecov.io/gh/PaddlePaddle/ERNIE-Bot-SDK/branch/develop/graph/badge.svg)](https://codecov.io/gh/PaddlePaddle/ERNIE-Bot-SDK)
[![codecov](https://codecov.io/gh/PaddlePaddle/ERNIE-SDK/branch/develop/graph/badge.svg)](https://codecov.io/gh/PaddlePaddle/ERNIE-SDK)

</div>

ERNIE Bot SDK 仓库包含两个项目:ERNIE Bot Agent 和 ERNIE Bot。ERNIE Bot Agent 是百度飞桨推出的基于文心大模型编排能力的大模型智能体开发框架,结合了飞桨星河社区的丰富预置平台功能。ERNIE Bot 则为开发者提供便捷接口,轻松调用文心大模型的文本创作、通用对话、语义向量及AI作图等基础功能。

![eb_sdk_agent_structure](https://github.com/PaddlePaddle/ERNIE-Bot-SDK/assets/11987277/1fbcfbca-7695-4cca-9b4f-35a49d1d7c52)
![eb_sdk_agent_structure](https://github.com/PaddlePaddle/ERNIE-SDK/assets/11987277/1fbcfbca-7695-4cca-9b4f-35a49d1d7c52)

## ERNIE Bot Agent

Expand All @@ -41,8 +41,8 @@ ERNIE Bot SDK 仓库包含两个项目:ERNIE Bot Agent 和 ERNIE Bot。ERNIE B
执行如下命令,使用源码安装 ERNIE Bot Agent(要求Python >= 3.8)。

```shell
git clone https://github.com/PaddlePaddle/ERNIE-Bot-SDK.git
cd ERNIE-Bot-SDK
git clone https://github.com/PaddlePaddle/ERNIE-SDK.git
cd ERNIE-SDK

# 首先安装Ernie Bot
pip install ./erniebot
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ hide:

</div>

ERNIE Bot SDK 仓库包含两个项目:ERNIE Bot Agent 和 ERNIE Bot。ERNIE Bot Agent 是百度飞桨推出的基于文心大模型编排能力的大模型智能体开发框架,结合了飞桨星河社区的丰富预置平台功能。ERNIE Bot 则为开发者提供便捷接口,轻松调用文心大模型的文本创作、通用对话、语义向量及AI作图等基础功能。
ERNIE SDK 仓库包含两个项目:ERNIE Bot Agent 和 ERNIE Bot。ERNIE Bot Agent 是百度飞桨推出的基于文心大模型编排能力的大模型智能体开发框架,结合了飞桨星河社区的丰富预置平台功能。ERNIE Bot 则为开发者提供便捷接口,轻松调用文心大模型的文本创作、通用对话、语义向量及AI作图等基础功能。

![eb_sdk_agent_structure](https://github.com/PaddlePaddle/ERNIE-Bot-SDK/assets/11987277/1fbcfbca-7695-4cca-9b4f-35a49d1d7c52)
![eb_sdk_agent_structure](https://github.com/PaddlePaddle/ERNIE-SDK/assets/11987277/1fbcfbca-7695-4cca-9b4f-35a49d1d7c52)


## ERNIE Bot Agent
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/chat_models.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
| 属性 | 类型 | 描述 |
| ---------- | -------------- | ------------------------------------------------------- |
| model | str | 文心一言模型的名称,支持"ernie-3.5", "ernie-turbo", "ernie-4.0", "ernie-longtext" |
| default_chat_kwargs | Dict[str, Any] | 设置调用文心一言模型的默认参数,支持`temperature`,`top_p`等,具体参考[文档](https://github.com/PaddlePaddle/ERNIE-Bot-SDK/blob/develop/docs/sdk/api_reference/chat_completion.md)|
| default_chat_kwargs | Dict[str, Any] | 设置调用文心一言模型的默认参数,支持`temperature`,`top_p`等,具体参考[文档](https://github.com/PaddlePaddle/ERNIE-SDK/blob/develop/docs/sdk/api_reference/chat_completion.md)|

| 方法 | 描述 |
| ----------------- | -------------------------------------------------------------------- |
Expand All @@ -41,7 +41,7 @@
| api_type | str | 文心一言模型的后端,支持"aistudio"和"qianfan",默认是"aistudio"。 |
| access_token | Optional[str] | 文心一言模型的鉴权access token,不同后端需要使用对应的access token |
| enable_multi_step_tool_call | bool | 设置是否开启多工具规划连续调用的功能,默认为False |
| default_chat_kwargs | Dict[str, Any] | 设置调用文心一言模型的默认参数,支持`temperature`,`top_p`等等,具体参考[文档](https://github.com/PaddlePaddle/ERNIE-Bot-SDK/blob/develop/docs/sdk/api_reference/chat_completion.md) |
| default_chat_kwargs | Dict[str, Any] | 设置调用文心一言模型的默认参数,支持`temperature`,`top_p`等等,具体参考[文档](https://github.com/PaddlePaddle/ERNIE-SDK/blob/develop/docs/sdk/api_reference/chat_completion.md) |

| 方法 | 描述 |
| ----------------- | -------------------------------------------------------------------- |
Expand Down
4 changes: 2 additions & 2 deletions docs/quickstart/preparation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
执行如下命令,使用源码安装ERNIE Bot Agent(要求Python >= 3.8)。

```shell
git clone https://github.com/PaddlePaddle/ERNIE-Bot-SDK.git
cd ERNIE-Bot-SDK
git clone https://github.com/PaddlePaddle/ERNIE-SDK.git
cd ERNIE-SDK

# 切换到特定分支,默认是develop分支
# git checkout -b xxx origin/xxx
Expand Down
4 changes: 2 additions & 2 deletions docs/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ response = erniebot.Image.create(
print(response.get_result())
```

<img width="512" src="https://github.com/PaddlePaddle/ERNIE-Bot-SDK/assets/1371212/73911c97-ef42-4803-8dc6-d385486c128c" />
<img width="512" src="https://github.com/PaddlePaddle/ERNIE-SDK/assets/1371212/73911c97-ef42-4803-8dc6-d385486c128c" />

我们推荐两个撰写文生图提示词的文档,大家可以组合使用,创作出更加精美的图片。

Expand Down Expand Up @@ -219,7 +219,7 @@ print(response.get_result())

## Gradio Demos

为了让用户更全面、更直观地了解ERNIE Bot的各项功能,我们基于Gradio开发了一系列带有web用户界面的演示应用。请参阅[说明文档](https://github.com/PaddlePaddle/ERNIE-Bot-SDK/tree/develop/examples/README.md),尝试对话补全、语义向量、文生图、函数调用等可交互例子。
为了让用户更全面、更直观地了解ERNIE Bot的各项功能,我们基于Gradio开发了一系列带有web用户界面的演示应用。请参阅[说明文档](https://github.com/PaddlePaddle/ERNIE-SDK/tree/develop/examples/README.md),尝试对话补全、语义向量、文生图、函数调用等可交互例子。

<img width="1296" src="https://user-images.githubusercontent.com/19339784/264367116-600c34b9-0103-4fb7-bbe5-6d71ddc6af09.gif" />

Expand Down
4 changes: 2 additions & 2 deletions docs/sdk/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ pip install --upgrade erniebot
如果希望自源码安装,可以执行如下命令:

```{.sh .copy}
git clone https://github.com/PaddlePaddle/ERNIE-Bot-SDK
cd ERNIE-Bot-SDK
git clone https://github.com/PaddlePaddle/ERNIE-SDK
cd ERNIE-SDK
pip install --upgrade setuptools
pip install .
```
9 changes: 5 additions & 4 deletions erniebot-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
**ERNIE Bot Agent** 是由百度飞桨全新推出的大模型智能体(agent)开发框架。基于文心大模型强大的编排能力,并结合飞桨星河社区提供的丰富预置平台化功能,**ERNIE Bot Agent** 旨在成为功能全面且高度可定制的一站式大模型智能体和应用开发框架。

[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](LICENSE)
[![Version](https://img.shields.io/github/release/PaddlePaddle/ERNIE-Bot-SDK.svg)](https://github.com/PaddlePaddle/ERNIE-Bot-SDK/releases)
[![Version](https://img.shields.io/github/release/PaddlePaddle/ERNIE-SDK.svg)](https://github.com/PaddlePaddle/ERNIE-SDK/releases)
![Supported Python versions](https://img.shields.io/badge/python-3.8+-orange.svg)
![Supported OSs](https://img.shields.io/badge/os-linux%2C%20win%2C%20mac-yellow.svg)
[![Downloads](https://pepy.tech/badge/erniebot-agent)](https://pepy.tech/project/erniebot-agent)
[![codecov](https://codecov.io/gh/PaddlePaddle/ERNIE-Bot-SDK/branch/develop/graph/badge.svg)](https://codecov.io/gh/PaddlePaddle/ERNIE-Bot-SDK)
[![codecov](https://codecov.io/gh/PaddlePaddle/ERNIE-SDK/branch/develop/graph/badge.svg)](https://codecov.io/gh/PaddlePaddle/ERNIE-SDK)

</div>

Expand All @@ -32,8 +32,8 @@
执行如下命令,使用源码安装 ERNIE Bot Agent(要求Python >= 3.8)。

```shell
git clone https://github.com/PaddlePaddle/ERNIE-Bot-SDK.git
cd ERNIE-Bot-SDK
git clone https://github.com/PaddlePaddle/ERNIE-SDK.git
cd ERNIE-SDK

# 首先安装Ernie Bot
pip install ./erniebot
Expand All @@ -54,6 +54,7 @@ pip install --upgrade erniebot-agent
# 安装所有模块
pip install --upgrade erniebot-agent[all]
```

## 快速体验

Expand Down
4 changes: 2 additions & 2 deletions erniebot-agent/applications/eb-agent-qa-bot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class FaissSearch:
> 第一步:下载项目源代码,请确保您已经安装了erniebot_agent以及erniebot
```bash
git clone https://github.com/PaddlePaddle/ERNIE-Bot-SDK.git
cd ERNIE-Bot-SDK
git clone https://github.com/PaddlePaddle/ERNIE-SDK.git
cd ERNIE-SDK
pip install ernie_agent
```

Expand Down
2 changes: 1 addition & 1 deletion erniebot-agent/cookbook/chat_models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"\n",
"### 安装\n",
"\n",
"大家可以参考[官方文档](https://github.com/PaddlePaddle/ERNIE-Bot-SDK),进行安装ERNIE Bot Agent 和 ERNIE Bot。\n",
"大家可以参考[官方文档](https://github.com/PaddlePaddle/ERNIE-SDK),进行安装ERNIE Bot Agent 和 ERNIE Bot。\n",
"\n"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"根据[ERNIE Bot 认证鉴权文档](https://github.com/PaddlePaddle/ERNIE-Bot-SDK/blob/develop/docs/authentication.md)中的说明,获取AI Studio星河社区的access token。执行如下代码,填写access token并敲击回车键:"
"根据[ERNIE Bot 认证鉴权文档](https://github.com/PaddlePaddle/ERNIE-SDK/blob/develop/docs/authentication.md)中的说明,获取AI Studio星河社区的access token。执行如下代码,填写access token并敲击回车键:"
]
},
{
Expand Down
9 changes: 5 additions & 4 deletions erniebot-agent/cookbook/memory.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -28,7 +29,7 @@
"下面我们展示怎么使用不同类型的memory模块:\n",
"\n",
"### 环境准备:\n",
"参考[环境准备](https://github.com/PaddlePaddle/ERNIE-Bot-SDK/blob/develop/docs/modules/preparation.md)文档进行ERNIEbot Agent相关环境准备。"
"参考[环境准备](https://github.com/PaddlePaddle/ERNIE-SDK/blob/develop/docs/modules/preparation.md)文档进行ERNIEbot Agent相关环境准备。"
]
},
{
Expand Down Expand Up @@ -273,7 +274,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.10.0 ('py310')",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -287,12 +288,12 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.0"
"version": "3.11.0"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "38a7b1e41871c94f34ddb1d7ff2429a8e2bb50de12df5a395c252657f497406c"
"hash": "aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion erniebot-agent/cookbook/message.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"\n",
"### 安装\n",
"\n",
"大家可以参考[官方文档](https://github.com/PaddlePaddle/ERNIE-Bot-SDK),进行安装ERNIE Bot。\n"
"大家可以参考[官方文档](https://github.com/PaddlePaddle/ERNIE-SDK),进行安装ERNIE Bot。\n"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions erniebot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
ERNIE Bot提供便捷易用的接口,可以调用文心大模型的能力,包含文本创作、通用对话、语义向量、AI作图等。

[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](LICENSE)
[![Version](https://img.shields.io/github/release/PaddlePaddle/ERNIE-Bot-SDK.svg)](https://github.com/PaddlePaddle/ERNIE-Bot-SDK/releases)
[![Version](https://img.shields.io/github/release/PaddlePaddle/ERNIE-SDK.svg)](https://github.com/PaddlePaddle/ERNIE-SDK/releases)
![Supported Python versions](https://img.shields.io/badge/python-3.8+-orange.svg)
![Supported OSs](https://img.shields.io/badge/os-linux%2C%20win%2C%20mac-yellow.svg)

Expand Down Expand Up @@ -179,7 +179,7 @@ response = erniebot.Image.create(
print(response.get_result())
```

<img width="512" src="https://github.com/PaddlePaddle/ERNIE-Bot-SDK/assets/1371212/73911c97-ef42-4803-8dc6-d385486c128c" />
<img width="512" src="https://github.com/PaddlePaddle/ERNIE-SDK/assets/1371212/73911c97-ef42-4803-8dc6-d385486c128c" />

我们推荐两个撰写文生图提示词的文档,大家可以组合使用,创作出更加精美的图片。

Expand Down
4 changes: 2 additions & 2 deletions erniebot/examples/retrieval_function_call/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## 简介

我们构建了一个名为**ERNIE Bot 城市建设法规标准小助手**的演示应用,展示了如何借助检索增强和函数调用的力量拓展大型模型的专有领域知识。我们使用[PaddleNLP Pipelines流水线系统](https://github.com/PaddlePaddle/PaddleNLP/tree/develop/pipelines)[ERNIE Bot 语义向量Embedding](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/alj562vvu)搭建了本地语义检索服务,为大型模型提供了检索本地知识库的能力。此外,借助ERNIE Bot的[函数调用Function Call](https://github.com/PaddlePaddle/ERNIE-Bot-SDK#%E5%87%BD%E6%95%B0%E8%B0%83%E7%94%A8function-calling)能力,我们可以根据上下文和用户提出的具体问题,让大型模型在回答问题时决定是否采用检索增强方式,或是直接回答。这一设计在赋予了大模型更多领域知识的同时,也保留了领域知识以外的通用大模型对话能力。
我们构建了一个名为**ERNIE Bot 城市建设法规标准小助手**的演示应用,展示了如何借助检索增强和函数调用的力量拓展大型模型的专有领域知识。我们使用[PaddleNLP Pipelines流水线系统](https://github.com/PaddlePaddle/PaddleNLP/tree/develop/pipelines)[ERNIE语义向量Embedding](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/alj562vvu)搭建了本地语义检索服务,为大型模型提供了检索本地知识库的能力。此外,借助ERNIE Bot的[函数调用Function Call](https://github.com/PaddlePaddle/ERNIE-SDK#%E5%87%BD%E6%95%B0%E8%B0%83%E7%94%A8function-calling)能力,我们可以根据上下文和用户提出的具体问题,让大型模型在回答问题时决定是否采用检索增强方式,或是直接回答。这一设计在赋予了大模型更多领域知识的同时,也保留了领域知识以外的通用大模型对话能力。

![retrieval_function_call_demo](https://github.com/PaddlePaddle/ERNIE-Bot-SDK/assets/11987277/ad7edf01-620a-427d-81f1-368501b764ad)
![retrieval_function_call_demo](https://github.com/PaddlePaddle/ERNIE-SDK/assets/11987277/ad7edf01-620a-427d-81f1-368501b764ad)

## 安装依赖

Expand Down
2 changes: 1 addition & 1 deletion erniebot/src/erniebot/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ async def asend_request_raw(
def _get_request_headers(self, method: str, supplied_headers: Optional[HeadersType]) -> HeadersType:
headers = {}

headers["User-Agent"] = f"ERNIE-Bot-SDK/{erniebot.__version__}"
headers["User-Agent"] = f"ERNIE-SDK/{erniebot.__version__}"
# TODO: Add other default headers

if supplied_headers is not None:
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
site_name: ERNIE Bot Agent
repo_url: https://github.com/PaddlePaddle/ERNIE-Bot-SDK/
repo_url: https://github.com/PaddlePaddle/ERNIE-SDK/
repo_name: ERNIE-Bot-Agent
site_url: https://ernie-bot-agent.readthedocs.io/zh-cn/latest/
site_description: provides an easy-to-use Chinese agent builder tool suite.
Expand Down

0 comments on commit a669ce7

Please sign in to comment.