From a648d3b8568c32895bf011ff676856f4119c049a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=A0=83?= Date: Wed, 10 Apr 2024 14:40:18 +0800 Subject: [PATCH] Add doc about tool_cn,start_cn and memory,fix#391 --- docs/get_started/quickstart_CN.md | 4 ++-- docs/modules/memory_CN.md | 12 ++++++------ docs/modules/tool_CN.md | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/get_started/quickstart_CN.md b/docs/get_started/quickstart_CN.md index aa74b250..1d22ae8b 100644 --- a/docs/get_started/quickstart_CN.md +++ b/docs/get_started/quickstart_CN.md @@ -7,7 +7,7 @@ agent结合了大型语言模型(LLM)以及特定任务的工具,并利用 - 样本代码使用了 qwen-max 模型、绘图工具和天气预报工具。 - 使用 qwen-max 模型需要将示例中的 YOUR_DASHSCOPE_API_KEY 替换为您的 API-KEY,以便代码正常运行。您的 YOUR_DASHSCOPE_API_KEY 可以在[这里](https://help.aliyun.com/zh/dashscope/developer-reference/activate-dashscope-and-create-an-api-key)获得。绘图工具也调用了 DASHSCOPE API(wanx),因此不需要额外配置。 - 在使用天气预报工具时,需要将示例中的 YOUR_AMAP_TOKEN 替换为您的高德天气 API-KEY,以便代码能够正常运行。您的 YOUR_AMAP_TOKEN 可以在[这里](https://lbs.amap.com/api/javascript-api-v2/guide/services/weather)获得。 - + ```Python # 配置环境变量;如果您已经提前将api-key提前配置到您的运行环境中,可以省略这个步骤 import os @@ -52,4 +52,4 @@ Action Input: {"text": "朝阳区城市风光", "resolution": "1024*1024"} 目前,朝阳区的天气状况为阴天,气温为1度。同时,我已为你生成了一张朝阳区的城市风光图,如下所示: ![](https://dashscope-result-sh.oss-cn-shanghai.aliyuncs.com/1d/45/20240204/3ab595ad/96d55ca6-6550-4514-9013-afe0f917c7ac-1.jpg?Expires=1707123521&OSSAccessKeyId=LTAI5tQZd8AEcZX6KZV4G8qL&Signature=RsJRt7zsv2y4kg7D9QtQHuVkXZY%3D) -``` \ No newline at end of file +``` diff --git a/docs/modules/memory_CN.md b/docs/modules/memory_CN.md index 27db39f7..9e3245a7 100644 --- a/docs/modules/memory_CN.md +++ b/docs/modules/memory_CN.md @@ -28,7 +28,7 @@ memory可以通过读取本地文件来创建Langchain VectorStore来实现调 下载本地语料库 ```shell -wget -P /root/you_data/ https://modelscope.oss-cn-beijing.aliyuncs.com/resource/agent/modelscope_qa.txt +wget -P /root/you_data/ https://modelscope.oss-cn-beijing.aliyuncs.com/resource/agent/modelscope_qa.txt ``` agent实现调用本地知识库进行回答 @@ -44,7 +44,7 @@ from modelscope_agent.agents import RolePlay role_template = '你扮演一个python专家,需要给出解决方案' llm_config = { - 'model': 'qwen-max', + 'model': 'qwen-max', 'model_server': 'dashscope', } @@ -81,7 +81,7 @@ from modelscope_agent.agents import RolePlay role_template = '你扮演一个历史人物专家,了解从古至今的历史人物' llm_config = { - 'model': 'qwen-max', + 'model': 'qwen-max', 'model_server': 'dashscope', } @@ -134,7 +134,7 @@ from modelscope_agent.agents import RolePlay role_template = '你扮演一个明星人物专家,了解从古至今的电影明星' llm_config = { - 'model': 'qwen-max', + 'model': 'qwen-max', 'model_server': 'dashscope', } @@ -165,7 +165,7 @@ memory.save_history() role_template = '你扮演一个电影专家,了解从古至今的电影' llm_config = { - 'model': 'qwen-max', + 'model': 'qwen-max', 'model_server': 'dashscope', } @@ -180,4 +180,4 @@ text = '' for chunk in response: text += chunk print(text) -``` \ No newline at end of file +``` diff --git a/docs/modules/tool_CN.md b/docs/modules/tool_CN.md index 004404c2..b7d5809b 100644 --- a/docs/modules/tool_CN.md +++ b/docs/modules/tool_CN.md @@ -49,7 +49,7 @@ TOOL_REGISTRY['terminal'] = LangchainTool role_template = '你是一个助手,试图用工具帮助人类解决问题。' llm_config = { - 'model': 'qwen-max', + 'model': 'qwen-max', 'model_server': 'dashscope', } @@ -70,4 +70,4 @@ bot = RolePlay(function_list=function_list,llm=llm_config,instruction=role_templ - `image_enhancement`: [追影放大镜](https://github.com/dreamoving/Phantom). [DASHSCOPE_API_KEY](https://help.aliyun.com/zh/dashscope/developer-reference/activate-dashscope-and-create-an-api-key) 需要在环境变量中进行配置。 - `text-address`: [地理编码](https://www.modelscope.cn/models/iic/mgeo_geographic_elements_tagging_chinese_base/summary). [MODELSCOPE_API_TOKEN](https://www.modelscope.cn/my/myaccesstoken) 需要在环境变量中进行配置。 - `speech-generation`: [语音生成](https://www.modelscope.cn/models/iic/speech_sambert-hifigan_tts_zh-cn_16k/summary). [MODELSCOPE_API_TOKEN](https://www.modelscope.cn/my/myaccesstoken) 需要在环境变量中进行配置。 -- `video-generation`: [视频生成](https://www.modelscope.cn/models/iic/text-to-video-synthesis/summary). [MODELSCOPE_API_TOKEN](https://www.modelscope.cn/my/myaccesstoken) 需要在环境变量中进行配置。 \ No newline at end of file +- `video-generation`: [视频生成](https://www.modelscope.cn/models/iic/text-to-video-synthesis/summary). [MODELSCOPE_API_TOKEN](https://www.modelscope.cn/my/myaccesstoken) 需要在环境变量中进行配置。