增加删除和重命名会话函数
This commit is contained in:
+10
-1
@@ -1,5 +1,5 @@
|
|||||||
import type { IOnCompleted, IOnData, IOnError, IOnFile, IOnMessageEnd, IOnMessageReplace, IOnNodeFinished, IOnNodeStarted, IOnThought, IOnWorkflowFinished, IOnWorkflowStarted } from './base'
|
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'
|
import type { Feedbacktype } from '@/types/app'
|
||||||
|
|
||||||
export const sendChatMessage = async (
|
export const sendChatMessage = async (
|
||||||
@@ -60,3 +60,12 @@ export const updateFeedback = async ({ url, body }: { url: string; body: Feedbac
|
|||||||
export const generationConversationName = async (id: string) => {
|
export const generationConversationName = async (id: string) => {
|
||||||
return post(`conversations/${id}/name`, { body: { auto_generate: true } })
|
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}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user