From bce67e4e18ceb91316f6d3d1a93ee88b255226fe Mon Sep 17 00:00:00 2001 From: paituo <330435863@qq.com> Date: Thu, 29 Aug 2024 10:07:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=A0=E9=99=A4=E5=92=8C?= =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=E4=BC=9A=E8=AF=9D=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/index.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/service/index.ts b/service/index.ts index 0597c55..c54fd32 100644 --- a/service/index.ts +++ b/service/index.ts @@ -1,5 +1,5 @@ import type { IOnCompleted, IOnData, IOnError, IOnFile, IOnMessageEnd, IOnMessageReplace, IOnNodeFinished, IOnNodeStarted, IOnThought, IOnWorkflowFinished, IOnWorkflowStarted } from './base' -import { get, post, ssePost } from './base' +import { get, post, del, ssePost } from './base' import type { Feedbacktype } from '@/types/app' export const sendChatMessage = async ( @@ -60,3 +60,12 @@ export const updateFeedback = async ({ url, body }: { url: string; body: Feedbac export const generationConversationName = async (id: string) => { return post(`conversations/${id}/name`, { body: { auto_generate: true } }) } + +export const renameConversation = async (id: string, name: string) => { + return post(`conversations/${id}/name`, { body: { name: name, auto_generate: false } }) +} + +export const deleteConversation = async (id: string) => { + return del(`conversations/${id}`) +} +