mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 02:18:08 +08:00
add new conversation vars update api
This commit is contained in:
@ -10,7 +10,7 @@ import type {
|
||||
} from '@/types/workflow'
|
||||
import type { BlockEnum } from '@/app/components/workflow/types'
|
||||
import type { VarInInspect } from '@/types/workflow'
|
||||
import type { EnvironmentVariable } from '@/app/components/workflow/types'
|
||||
import type { ConversationVariable, EnvironmentVariable } from '@/app/components/workflow/types'
|
||||
|
||||
export const fetchWorkflowDraft = (url: string) => {
|
||||
return get(url, {}, { silent: true }) as Promise<FetchWorkflowDraftResponse>
|
||||
@ -115,3 +115,12 @@ export const updateEnvironmentVariables = ({ appId, environmentVariables }: {
|
||||
body: { environment_variables: environmentVariables },
|
||||
})
|
||||
}
|
||||
|
||||
export const updateConversationVariables = ({ appId, conversationVariables }: {
|
||||
appId: string
|
||||
conversationVariables: ConversationVariable[]
|
||||
}) => {
|
||||
return post<CommonResponse>(`apps/${appId}/workflows/draft/conversation-variables`, {
|
||||
body: { conversation_variables: conversationVariables },
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user