From cc7b5d128b6edefd1b3a0d032a4ccd8c31a40dbf Mon Sep 17 00:00:00 2001 From: crazywoola <100913391+crazywoola@users.noreply.github.com> Date: Mon, 7 Aug 2023 11:30:39 +0800 Subject: [PATCH] fix: doc issue in #757 (#767) --- api/controllers/service_api/app/conversation.py | 2 +- web/app/components/develop/template/template_chat.en.mdx | 2 +- web/app/components/develop/template/template_chat.zh.mdx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/controllers/service_api/app/conversation.py b/api/controllers/service_api/app/conversation.py index b58cd5a787..26a95bd6be 100644 --- a/api/controllers/service_api/app/conversation.py +++ b/api/controllers/service_api/app/conversation.py @@ -64,9 +64,9 @@ class ConversationDetailApi(AppApiResource): try: ConversationService.delete(app_model, conversation_id, end_user) - return {"result": "success"} except services.errors.conversation.ConversationNotExistsError: raise NotFound("Conversation Not Exists.") + return {"result": "success"}, 204 class ConversationRenameApi(AppApiResource): diff --git a/web/app/components/develop/template/template_chat.en.mdx b/web/app/components/develop/template/template_chat.en.mdx index 4cb4d29bd5..b13ae74ee6 100644 --- a/web/app/components/develop/template/template_chat.en.mdx +++ b/web/app/components/develop/template/template_chat.en.mdx @@ -312,7 +312,7 @@ For versatile conversational apps using a Q&A format, call the chat-messages API ```bash {{ title: 'cURL' }} - curl --location --request POST 'https://cloud.langgenius.dev/api/conversations/name' \ + curl --location --request POST 'https://cloud.langgenius.dev/api/conversations/{converation_id}/name' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \ --data-raw '{ diff --git a/web/app/components/develop/template/template_chat.zh.mdx b/web/app/components/develop/template/template_chat.zh.mdx index 76193544a8..98d8a6d79c 100644 --- a/web/app/components/develop/template/template_chat.zh.mdx +++ b/web/app/components/develop/template/template_chat.zh.mdx @@ -312,7 +312,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' ```bash {{ title: 'cURL' }} - curl --location --request POST 'https://cloud.langgenius.dev/api/conversations/name' \ + curl --location --request POST 'https://cloud.langgenius.dev/api/conversations/{converation_id}/name' \ --header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \ --header 'Content-Type: application/json' \ --data-raw '{