From b571c1114aaf40951995e3d8d27beedb716ca0f7 Mon Sep 17 00:00:00 2001 From: Zhicheng Zhang Date: Fri, 10 May 2024 21:07:11 +0800 Subject: [PATCH] update typo --- README.md | 2 +- modelscope_agent_servers/README.md | 8 ++++---- modelscope_agent_servers/assistant_server/api.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5f0a9e503..fa2f243f9 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ It mainly has the following characteristics: ## 🎉 News -* 🔥May 10, 2024: Modelscope-Agent launched a user-friendly `Assistant API`, and also provided a `Tools API` that executes utilities in isolated, secure containers. , please find the [document](https://github.com/modelscope/modelscope-agent/blob/master/modelscope_agent_servers/) +* 🔥May 10, 2024: Modelscope-Agent launched a user-friendly `Assistant API`, and also provided a `Tools API` that executes utilities in isolated, secure containers, please find the [document](https://github.com/modelscope/modelscope-agent/blob/master/modelscope_agent_servers/) * 🔥Apr 12, 2024: The [Ray](https://docs.ray.io/en/latest/) version of multi-agent solution is on modelscope-agent, please find the [document](https://github.com/modelscope/modelscope-agent/blob/master/modelscope_agent/multi_agents_utils/README.md) * Mar 15, 2024: Modelscope-Agent and the [AgentFabric](https://github.com/modelscope/modelscope-agent/tree/master/apps/agentfabric) (opensource version for GPTs) is running on the production environment of [modelscope studio](https://modelscope.cn/studios/agent). * Feb 10, 2024: In Chinese New year, we upgrade the modelscope agent to version v0.3 to facilitate developers to customize various types of agents more conveniently through coding and make it easier to make multi-agent demos. For more details, you can refer to [#267](https://github.com/modelscope/modelscope-agent/pull/267) and [#293](https://github.com/modelscope/modelscope-agent/pull/293) . diff --git a/modelscope_agent_servers/README.md b/modelscope_agent_servers/README.md index 94e55e1e7..3803861b0 100644 --- a/modelscope_agent_servers/README.md +++ b/modelscope_agent_servers/README.md @@ -51,7 +51,7 @@ To interact with the chat API, you should construct a object like `ChatRequest` An example code snippet is as follows: ```Shell -curl -X POST 'http://localhost:31512/v1/chat/completion' \ +curl -X POST 'http://localhost:31512/v1/chat/completions' \ -H 'Content-Type: application/json' \ -d '{ "tools": [{ @@ -115,7 +115,7 @@ To enable knowledge retrieval, you'll need to include use_knowledge and files in - `files`: the file(s) you wish to use during the conversation. By default, all previously uploaded files will be used. ```Shell -curl -X POST 'http://localhost:31512/v1/chat/completion' \ +curl -X POST 'http://localhost:31512/v1/chat/completions' \ -H 'Content-Type: application/json' \ -d '{ "tools": [ @@ -167,14 +167,14 @@ With above examples, the output should be like this: #### Assistant -Like `v1/chat/completion` API, you should construct a `ChatRequest` object when use `v1/assistant/lite`. Here is an example using python `requests` library. +Like `v1/chat/completions` API, you should construct a `ChatRequest` object when use `v1/assistants/lite`. Here is an example using python `requests` library. ```Python import os import requests -url = 'http://localhost:31512/v1/assistant/lite' +url = 'http://localhost:31512/v1/assistants/lite' # llm config llm_cfg = { diff --git a/modelscope_agent_servers/assistant_server/api.py b/modelscope_agent_servers/assistant_server/api.py index 03233265c..f0e57648b 100644 --- a/modelscope_agent_servers/assistant_server/api.py +++ b/modelscope_agent_servers/assistant_server/api.py @@ -70,7 +70,7 @@ async def upload_files(uuid_str: str = Form(...), request_id=request_id) -@app.post('/v1/assistant/lite') +@app.post('/v1/assistants/lite') async def chat(agent_request: ChatRequest): uuid_str = agent_request.uuid_str request_id = str(uuid4()) @@ -120,7 +120,7 @@ async def chat(agent_request: ChatRequest): return create_success_msg({'response': response}, request_id=request_id) -@app.post('/v1/chat/completion') +@app.post('/v1/chat/completions') async def chat_completion(agent_request: ChatRequest): uuid_str = agent_request.uuid_str request_id = str(uuid4())