Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename eb-turbo-appbuilder #177

Merged
merged 9 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ print(", ".join(models))

填写自己的Token,获取模型列表输出如下:
``` shell
ERNIE-Bot 4.0, ERNIE-Bot-8K, ERNIE-Bot, ERNIE-Bot-turbo, EB-turbo-AppBuilder专用版, Qianfan-Chinese-Llama-2-7B, Yi-34B-Chat, Llama-2-7B-Chat, Llama-2-13B-Chat, Llama-2-70B-Chat, ChatGLM2-6B-32K, ChatLaw, BLOOMZ-7B, Qianfan-BLOOMZ-7B-compressed, AquilaChat-7B
ERNIE-Bot 4.0, ERNIE-Bot-8K, ERNIE-Bot, ERNIE-Bot-turbo, ERNIE Speed-AppBuilder, Qianfan-Chinese-Llama-2-7B, Yi-34B-Chat, Llama-2-7B-Chat, Llama-2-13B-Chat, Llama-2-70B-Chat, ChatGLM2-6B-32K, ChatLaw, BLOOMZ-7B, Qianfan-BLOOMZ-7B-compressed, AquilaChat-7B
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

当前获取模型列表输出的名字应该是"EB-turbo-AppBuilder专用版", 确认下名字是否需要转成"ERNIE Speed-AppBuilder",这样使用新版本SDK的用户看到的就是"ERNIE Speed-AppBuilder"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Readme中展示的是模型原始名,所以此处输出的列表为EB-turbo-AppBuilder专用版,该问题已修复,感谢。
  2. 已经在get_model_listfunc处添加todo,使用appbuilder.get_model_list()应当返回一个包含原始名及相应short名的列表,该功能会在其他PR提供

```

为方便用户更容易使用模型,以下是一些模型的短名称
Expand All @@ -81,7 +81,7 @@ ERNIE-Bot 4.0, ERNIE-Bot-8K, ERNIE-Bot, ERNIE-Bot-turbo, EB-turbo-AppBuilder专
| ERNIE-Bot-8K | eb-8k |
| ERNIE-Bot | eb |
| ERNIE-Bot-turbo | eb-turbo |
| EB-turbo-AppBuilder专用版 | eb-turbo-appbuilder |
| ERNIE Speed-AppBuilder | ernie_speed_appbuilder |


### 典型示例
Expand All @@ -94,7 +94,7 @@ import appbuilder

# 空模版组件
template_str = "你扮演{role}, 请回答我的问题。\n\n问题:{question}。\n\n回答:"
playground = appbuilder.Playground(prompt_template=template_str, model="eb-turbo-appbuilder")
playground = appbuilder.Playground(prompt_template=template_str, model="ERNIE Speed-AppBuilder")

# 定义输入,调用空模版组件
input = appbuilder.Message({"role": "java工程师", "question": "java语言的内存回收机制是什么"})
Expand All @@ -107,7 +107,7 @@ print(playground(input, stream=False, temperature=1e-10))
import appbuilder

# 相似问生成组件
similar_q = appbuilder.SimilarQuestion(model="eb-turbo-appbuilder")
similar_q = appbuilder.SimilarQuestion(model="ERNIE Speed-AppBuilder")

# 定义输入,调用相似问生成
input = appbuilder.Message("我想吃冰淇淋,哪里的冰淇淋比较好吃?")
Expand Down Expand Up @@ -149,7 +149,7 @@ import appbuilder
# 空模版组件
playground = appbuilder.Playground(
prompt_template="{query}",
model="eb-turbo-appbuilder"
model="ERNIE Speed-AppBuilder"
)

# 使用 AgentRuntime 来服务化playground组件
Expand Down Expand Up @@ -196,7 +196,7 @@ class SimilarQuestion(CompletionBaseComponent):

os.environ["APPBUILDER_TOKEN"] = "..."

qa_mining = appbuilder.SimilarQuestion(model="eb-turbo-appbuilder")
qa_mining = appbuilder.SimilarQuestion(model="ERNIE Speed-AppBuilder")

msg = "我想吃冰淇淋,哪里的冰淇淋比较好吃?"
msg = appbuilder.Message(msg)
Expand Down
2 changes: 1 addition & 1 deletion appbuilder/core/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class AgentRuntime(BaseModel):
class PlaygroundWithHistory(Component):
def __init__(self):
super().__init__()
self.query_rewrite = QueryRewrite(model="eb-turbo-appbuilder")
self.query_rewrite = QueryRewrite(model="ERNIE Speed-AppBuilder")
self.play = Playground(
prompt_template="{query}",
model="eb-4"
Expand Down
2 changes: 1 addition & 1 deletion appbuilder/core/components/gbi/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ class ColumnItem(BaseModel):


SUPPORTED_MODEL_NAME = {
"ERNIE-Bot 4.0", "ERNIE-Bot-8K", "ERNIE-Bot", "ERNIE-Bot-turbo", "EB-turbo-AppBuilder"
"ERNIE-Bot 4.0", "ERNIE-Bot-8K", "ERNIE-Bot", "ERNIE-Bot-turbo", "ERNIE Speed-AppBuilder"
}
2 changes: 1 addition & 1 deletion appbuilder/core/components/gbi/nl2sql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ print(f"llm result: {nl2sql_result_message.content.llm_result}")
## 参数说明

### 初始化参数
- model_name: 支持的模型名字 ERNIE-Bot 4.0, ERNIE-Bot-8K, ERNIE-Bot, ERNIE-Bot-turbo, EB-turbo-AppBuilder"
- model_name: 支持的模型名字 ERNIE-Bot 4.0, ERNIE-Bot-8K, ERNIE-Bot, ERNIE-Bot-turbo, ERNIE Speed-AppBuilder
- table_schemas: 表的 schema,例如:

```
Expand Down
2 changes: 1 addition & 1 deletion appbuilder/core/components/gbi/nl2sql/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self, model_name: str, table_schemas: List[str], knowledge: Dict =
"""
创建 gbi nl2sql 对象
Args:
model_name: 支持的模型名字 ERNIE-Bot 4.0, ERNIE-Bot-8K, ERNIE-Bot, ERNIE-Bot-turbo, EB-turbo-AppBuilder
model_name: 支持的模型名字 ERNIE-Bot 4.0, ERNIE-Bot-8K, ERNIE-Bot, ERNIE-Bot-turbo, ERNIE Speed-AppBuilder
table_schemas: 表的 schema 列表,例如: ```
CREATE TABLE `mytable` (
`d_year` COMMENT '年度,2019,2020..2022..',
Expand Down
2 changes: 1 addition & 1 deletion appbuilder/core/components/gbi/select_table/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ print(f"选的表是: {select_table_result_message.content}")

## 参数说明
### 初始化参数
- model_name: 支持的模型名字 ERNIE-Bot 4.0, ERNIE-Bot-8K, ERNIE-Bot, ERNIE-Bot-turbo, EB-turbo-AppBuilder
- model_name: 支持的模型名字 ERNIE-Bot 4.0, ERNIE-Bot-8K, ERNIE-Bot, ERNIE-Bot-turbo, ERNIE Speed-AppBuilder
- table_descriptions: 表的描述是个字典,key: 是表的名字, value: 是表的描述,例如:

```
Expand Down
2 changes: 1 addition & 1 deletion appbuilder/core/components/gbi/select_table/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self, model_name: str, table_descriptions: Dict[str, str],
"""
创建 GBI 选表对象
Args:
model_name: 支持的模型名字 ERNIE-Bot 4.0, ERNIE-Bot-8K, ERNIE-Bot, ERNIE-Bot-turbo, EB-turbo-AppBuilder
model_name: 支持的模型名字 ERNIE-Bot 4.0, ERNIE-Bot-8K, ERNIE-Bot, ERNIE-Bot-turbo, ERNIE Speed-AppBuilder
table_descriptions: 表的描述是个字典,key: 是表的名字, value: 是表的描述,例如:
{
"超市营收明细表": "超市营收明细表,包含超市各种信息等",
Expand Down
2 changes: 1 addition & 1 deletion appbuilder/core/components/llms/dialog_summary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import os
# 请前往千帆AppBuilder官网创建密钥,流程详见:https://cloud.baidu.com/doc/AppBuilder/s/Olq6grrt6#1%E3%80%81%E5%88%9B%E5%BB%BA%E5%AF%86%E9%92%A5
os.environ["APPBUILDER_TOKEN"] = "bce-YOURTOKEN"

dialog_summary = appbuilder.DialogSummary("eb-turbo-appbuilder")
dialog_summary = appbuilder.DialogSummary("ERNIE Speed-AppBuilder")
text = "用户:喂我想查一下我的话费\n坐席:好的女士您话费余的话还有87.49元钱\n用户:好的知道了谢谢\n坐席:嗯不客气祝您生活愉快再见"
answer = dialog_summary(appbuilder.Message(text))
print(answer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class DialogSummary(CompletionBaseComponent):
# 请前往千帆AppBuilder官网创建密钥,流程详见:https://cloud.baidu.com/doc/AppBuilder/s/Olq6grrt6#1%E3%80%81%E5%88%9B%E5%BB%BA%E5%AF%86%E9%92%A5
os.environ["APPBUILDER_TOKEN"] = '...'

dialog_summary = appbuilder.DialogSummary("eb-turbo-appbuilder")
dialog_summary = appbuilder.DialogSummary("ERNIE Speed-AppBuilder")
text = "用户:喂我想查一下我的话费\n坐席:好的女士您话费余的话还有87.49元钱\n用户:好的知道了谢谢\n坐席:嗯不客气祝您生活愉快再见"
answer = dialog_summary(appbuilder.Message(text))
print(answer)
Expand Down
4 changes: 2 additions & 2 deletions appbuilder/core/components/llms/is_complex_query/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import appbuilder
# 请前往千帆AppBuilder官网创建密钥,流程详见:https://cloud.baidu.com/doc/AppBuilder/s/Olq6grrt6#1%E3%80%81%E5%88%9B%E5%BB%BA%E5%AF%86%E9%92%A5
os.environ["APPBUILDER_TOKEN"] = "..."

is_complex_query = appbuilder.IsComplexQuery(model="eb-turbo-appbuilder")
is_complex_query = appbuilder.IsComplexQuery(model="ERNIE Speed-AppBuilder")

msg = "吸塑包装盒在工业化生产和物流运输中分别有什么重要性?"
msg = appbuilder.Message(msg)
Expand All @@ -42,7 +42,7 @@ os.environ["APPBUILDER_TOKEN"] = "bce-YOURTOKEN"
### 初始化参数
|参数名称 |参数类型 |是否必须 |描述 |示例值|
|--------|--------|--------|----|------|
|model |str |是 |模型名称,用于指定要使用的千帆模型|eb-turbo-appbuilder|
|model |str |是 |模型名称,用于指定要使用的千帆模型|ERNIE Speed-AppBuilder|

### 调用参数
|参数名称 |参数类型 |是否必须 |描述 |示例值|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class IsComplexQuery(CompletionBaseComponent):
# 请前往千帆AppBuilder官网创建密钥,流程详见:https://cloud.baidu.com/doc/AppBuilder/s/Olq6grrt6#1%E3%80%81%E5%88%9B%E5%BB%BA%E5%AF%86%E9%92%A5
os.environ["APPBUILDER_TOKEN"] = "..."

is_complex_query = appbuilder.IsComplexQuery(model="eb-turbo-appbuilder")
is_complex_query = appbuilder.IsComplexQuery(model="ERNIE Speed-AppBuilder")

msg = "吸塑包装盒在工业化生产和物流运输中分别有什么重要性?"
msg = appbuilder.Message(msg)
Expand Down
6 changes: 3 additions & 3 deletions appbuilder/core/components/llms/mrc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ MRC(阅读理解问答模块)是一项先进的自然语言处理功能,
### 特色优势
我们的MRC模块,基于百度自研的先进语言模型文新一言,提供了一系列强大的阅读理解问答功能。在保持文本理解和问题回答的高精度的同时,
我们特别强调了答案的质量和交互体验。以下是我们MRC模块的几个主要功能特色:
- 1.多版本模型支持:我们的MRC模块包括不同版本的文新一言大模型,Erniebot 4.0、EB-turbo-AppBuilder等,每个版本都针对特定的应用场景进行了优化。 用户可以根据自己的需求选择最适合的模型版本,以获得最佳的性能。
- 1.多版本模型支持:我们的MRC模块包括不同版本的文新一言大模型,Erniebot 4.0、ERNIE Speed-AppBuilder等,每个版本都针对特定的应用场景进行了优化。 用户可以根据自己的需求选择最适合的模型版本,以获得最佳的性能。
- 2.答案格式的多样性:
- 拒答功能:当问题超出模型知识范围或不具体时,模型可以选择不回答,避免提供误导性信息。
- 澄清功能:对于模棱两可或含糊的问题,模型可以请求更多信息或对问题进行澄清,以确保答案的准确性。
Expand Down Expand Up @@ -41,7 +41,7 @@ import os
os.environ["APPBUILDER_TOKEN"] = "..."

# 创建MRC对象
mrc_component = appbuilder.MRC(model="eb-turbo-appbuilder")
mrc_component = appbuilder.MRC(model="ERNIE Speed-AppBuilder")

# 初始化参数
msg = "残疾人怎么办相关证件"
Expand Down Expand Up @@ -119,7 +119,7 @@ import os
os.environ["APPBUILDER_TOKEN"] = '...'

# 创建MRC对象
mrc_component = appbuilder.MRC(model="eb-turbo-appbuilder")
mrc_component = appbuilder.MRC(model="ERNIE Speed-AppBuilder")

# 初始化参数
msg = "残疾人怎么办相关证件"
Expand Down
2 changes: 1 addition & 1 deletion appbuilder/core/components/llms/nl2pandas/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ query = "海淀区有哪些学校"
query = appbuilder.Message(query)

#定义并运行Nl2pandas实例,得到结果
nl2pandas = appbuilder.Nl2pandasComponent(model="eb-turbo-appbuilder")
nl2pandas = appbuilder.Nl2pandasComponent(model="ERNIE Speed-AppBuilder")
answer = nl2pandas(query, table_info = table_info)
```

Expand Down
2 changes: 1 addition & 1 deletion appbuilder/core/components/llms/nl2pandas/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Nl2pandasComponent(CompletionBaseComponent):
query = "海淀区有哪些学校"
query = appbuilder.Message(query)

nl2pandas = appbuilder.Nl2pandasComponent(model="eb-turbo-appbuilder")
nl2pandas = appbuilder.Nl2pandasComponent(model="ERNIE Speed-AppBuilder")
answer = nl2pandas(query, table_info = table_info)
"""
name = "nl2pandas"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ text = ('文档标题:在OPPO Reno5上使用视频超级防抖\n'
'防抖 开启路径:打开「相机 > 视频 > 点击屏幕上方的“超级防抖”标识」 后置视频同时支持超级防抖和超级防抖Pro功能,开启超级'
'防抖后手机屏幕将出现超级防抖Pro开关,点击即可开启或关闭。 除此之外,前置视频同样加持防抖算法,边走边拍也能稳定聚焦脸部'
',实时视频分享您的生活。')
oral_query_generation = appbuilder.OralQueryGeneration(model='eb-turbo-appbuilder')
oral_query_generation = appbuilder.OralQueryGeneration(model='ERNIE Speed-AppBuilder')
result = oral_query_generation(appbuilder.Message(text))
print(result)
```
Expand All @@ -43,7 +43,7 @@ os.environ["APPBUILDER_TOKEN"] = "bce-YOURTOKEN"

| 参数名称 | 参数类型 | 是否必须 | 描述 | 示例值 |
| ------- | ------- | -------- | -------- | -------- |
| `model` | str | 否 | 模型名称,用于指定要使用的千帆模型。 | eb-turbo-appbuilder |
| `model` | str | 否 | 模型名称,用于指定要使用的千帆模型。 | ERNIE Speed-AppBuilder |
| `secret_key` | str | 否 | 用户鉴权token,默认从环境变量中获取: `os.getenv("APPBUILDER_TOKEN", "")` | |
| `gateway` | str | 否 | 后端网关服务地址,默认从环境变量中获取: `os.getenv("GATEWAY_URL", "")` | |
| `lazy_certification` | bool | 否 | 延迟认证,为True时在第一次运行时认证。默认为False。 | False |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class OralQueryGeneration(CompletionBaseComponent):
'防抖 开启路径:打开「相机 > 视频 > 点击屏幕上方的“超级防抖”标识」 后置视频同时支持超级防抖和超级防抖Pro功能,开启超级'
'防抖后手机屏幕将出现超级防抖Pro开关,点击即可开启或关闭。 除此之外,前置视频同样加持防抖算法,边走边拍也能稳定聚焦脸部'
',实时视频分享您的生活。')
oral_query_generation = appbuilder.OralQueryGeneration(model='eb-turbo-appbuilder')
oral_query_generation = appbuilder.OralQueryGeneration(model='ERNIE Speed-AppBuilder')
answer = oral_query_generation(appbuilder.Message(text))
print(answer.content)
"""
Expand Down
2 changes: 1 addition & 1 deletion appbuilder/core/components/llms/playground/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ os.environ["APPBUILDER_TOKEN"] = "..."

play = appbuilder.Playground(
prompt_template="你好,{name},我是{bot_name},{bot_name}是一个{bot_type},我可以{bot_function},你可以问我{bot_question}。",
model="eb-turbo-appbuilder"
model="ERNIE Speed-AppBuilder"
)
play(appbuilder.Message({"name": "小明", "bot_name": "小红", "bot_type": "聊天机器人", "bot_function": "聊天", "bot_question": "你好吗?"}), stream=False)
```
Expand Down
2 changes: 1 addition & 1 deletion appbuilder/core/components/llms/playground/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Playground(CompletionBaseComponent):
import appbuilder
os.environ["APPBUILDER_TOKEN"] = "..."

play = appbuilder.Playground(prompt_template="你好,{name},我是{bot_name},{bot_name}是一个{bot_type},我可以{bot_function},你可以问我{bot_question}。", model="eb-turbo-appbuilder")
play = appbuilder.Playground(prompt_template="你好,{name},我是{bot_name},{bot_name}是一个{bot_type},我可以{bot_function},你可以问我{bot_question}。", model="ERNIE Speed-AppBuilder")
play(appbuilder.Message({"name": "小明", "bot_name": "小红", "bot_type": "聊天机器人", "bot_function": "聊天", "bot_question": "你好吗?"}), stream=False)

"""
Expand Down
4 changes: 2 additions & 2 deletions appbuilder/core/components/llms/qa_pair_mining/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import appbuilder
# 请前往千帆AppBuilder官网创建密钥,流程详见:https://cloud.baidu.com/doc/AppBuilder/s/Olq6grrt6#1%E3%80%81%E5%88%9B%E5%BB%BA%E5%AF%86%E9%92%A5
os.environ["APPBUILDER_TOKEN"] = "..."

qa_mining = appbuilder.QAPairMining(model="eb-turbo-appbuilder")
qa_mining = appbuilder.QAPairMining(model="ERNIE Speed-AppBuilder")
# 输入文本(对此文本挖掘问答对)
msg = '2017年,工商银行根据外部宏观环境变化,及时调整业务策略,优化资产负债结构,' + \
'保持存贷款业务协调发展,提升资产负债配置效率。' + \
Expand Down Expand Up @@ -110,7 +110,7 @@ split_result = splitter(parse_result)

# 每个段落抽取问答对,并返回结果
for doc_segment in split_result.content["paragraphs"]:
qa_mining = QAPairMining(model="eb-turbo-appbuilder")
qa_mining = QAPairMining(model="ERNIE Speed-AppBuilder")
text = doc_segment.get("text", "")
if text == "":
logger.error("Text is null. break")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class QAPairMining(CompletionBaseComponent):

os.environ["APPBUILDER_TOKEN"] = "..."

qa_mining = appbuilder.QAPairMining(model="eb-turbo-appbuilder")
qa_mining = appbuilder.QAPairMining(model="ERNIE Speed-AppBuilder")
# 输入文本(对此文本挖掘问答对)
msg = '2017年,工商银行根据外部宏观环境变化,及时调整业务策略,优化资产负债结构,' + \
'保持存贷款业务协调发展,提升资产负债配置效率。' + \
Expand Down
4 changes: 2 additions & 2 deletions appbuilder/core/components/llms/query_decomposition/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import appbuilder
# 请前往千帆AppBuilder官网创建密钥,流程详见:https://cloud.baidu.com/doc/AppBuilder/s/Olq6grrt6#1%E3%80%81%E5%88%9B%E5%BB%BA%E5%AF%86%E9%92%A5
os.environ["APPBUILDER_TOKEN"] = "..."

query_decomposition = appbuilder.QueryDecomposition(model="eb-turbo-appbuilder")
query_decomposition = appbuilder.QueryDecomposition(model="ERNIE Speed-AppBuilder")

msg = "吸塑包装盒在工业化生产和物流运输中分别有什么重要性?"
msg = appbuilder.Message(msg)
Expand All @@ -42,7 +42,7 @@ os.environ["APPBUILDER_TOKEN"] = "bce-YOURTOKEN"
### 初始化参数
|参数名称 |参数类型 |是否必须 |描述 |示例值|
|--------|--------|--------|----|------|
|model |str |是 |模型名称,用于指定要使用的千帆模型|eb-turbo-appbuilder|
|model |str |是 |模型名称,用于指定要使用的千帆模型|ERNIE Speed-AppBuilder|

### 调用参数
|参数名称 |参数类型 |是否必须 |描述 |示例值|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class QueryDecomposition(CompletionBaseComponent):
# 请前往千帆AppBuilder官网创建密钥,流程详见:https://cloud.baidu.com/doc/AppBuilder/s/Olq6grrt6#1%E3%80%81%E5%88%9B%E5%BB%BA%E5%AF%86%E9%92%A5
os.environ["APPBUILDER_TOKEN"] = "..."

query_decomposition = appbuilder.QueryDecomposition(model="eb-turbo-appbuilder")
query_decomposition = appbuilder.QueryDecomposition(model="ERNIE Speed-AppBuilder")

msg = "吸塑包装盒在工业化生产和物流运输中分别有什么重要性?"
msg = appbuilder.Message(msg)
Expand Down
2 changes: 1 addition & 1 deletion appbuilder/core/components/llms/query_rewrite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import appbuilder
os.environ["APPBUILDER_TOKEN"] = '...'

# 初始化并使用 QueryRewrite 组件
query_rewrite = appbuilder.QueryRewrite(model="eb-turbo-appbuilder")
query_rewrite = appbuilder.QueryRewrite(model="ERNIE Speed-AppBuilder")
answer = query_rewrite(appbuilder.Message(['我应该怎么办理护照?', '您可以查询官网或人工咨询', '我需要准备哪些材料?', '身份证、免冠照片一张以及填写完整的《中国公民因私出国(境)申请表》', '在哪里办']), rewrite_type="带机器人回复")
print(answer)
```
Expand Down
2 changes: 1 addition & 1 deletion appbuilder/core/components/llms/query_rewrite/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class QueryRewrite(CompletionBaseComponent):
import appbuilder
os.environ["APPBUILDER_TOKEN"] = '...'

query_rewrite = appbuilder.QueryRewrite(model="eb-turbo-appbuilder")
query_rewrite = appbuilder.QueryRewrite(model="ERNIE Speed-AppBuilder")
answer = query_rewrite(appbuilder.Message(['我应该怎么办理护照?',
'您可以查询官网或人工咨询',
'我需要准备哪些材料?',
Expand Down
2 changes: 1 addition & 1 deletion appbuilder/core/components/llms/similar_question/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import appbuilder
# 请前往千帆AppBuilder官网创建密钥,流程详见:https://cloud.baidu.com/doc/AppBuilder/s/Olq6grrt6#1%E3%80%81%E5%88%9B%E5%BB%BA%E5%AF%86%E9%92%A5
os.environ["APPBUILDER_TOKEN"] = "..."

similar_question = appbuilder.SimilarQuestion(model="eb-turbo-appbuilder")
similar_question = appbuilder.SimilarQuestion(model="ERNIE Speed-AppBuilder")

msg = "我想吃冰淇淋,哪里的冰淇淋比较好吃?"
msg = appbuilder.Message(msg)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class SimilarQuestion(CompletionBaseComponent):

os.environ["APPBUILDER_TOKEN"] = "..."

qa_mining = appbuilder.SimilarQuestion(model="eb-turbo-appbuilder")
qa_mining = appbuilder.SimilarQuestion(model="ERNIE Speed-AppBuilder")

msg = "我想吃冰淇淋,哪里的冰淇淋比较好吃?"
msg = appbuilder.Message(msg)
Expand Down
Loading
Loading