mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
Connect both creation inputs to the instruction-improvement endpoint without overwriting newer edits. Guide users through unavailable model setup and refresh both default-model query caches after configuration. Include generated contracts, locale strings, and creation-flow tests.
98 lines
2.5 KiB
TypeScript
98 lines
2.5 KiB
TypeScript
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import { oc } from '@orpc/contract'
|
|
import * as z from 'zod'
|
|
import {
|
|
zPostWorkflowGenerateBody,
|
|
zPostWorkflowGenerateImproveBody,
|
|
zPostWorkflowGenerateImproveResponse,
|
|
zPostWorkflowGenerateResponse,
|
|
zPostWorkflowGenerateStreamBody,
|
|
zPostWorkflowGenerateStreamResponse,
|
|
zPostWorkflowGenerateSuggestionsBody,
|
|
zPostWorkflowGenerateSuggestionsResponse,
|
|
} from './zod.gen'
|
|
|
|
/**
|
|
* Expand a workflow-generator instruction with the details it leaves unstated
|
|
*/
|
|
export const post = oc
|
|
.route({
|
|
description: 'Expand a workflow-generator instruction with the details it leaves unstated',
|
|
inputStructure: 'detailed',
|
|
method: 'POST',
|
|
operationId: 'postWorkflowGenerateImprove',
|
|
path: '/workflow-generate/improve',
|
|
tags: ['console'],
|
|
})
|
|
.input(z.object({ body: zPostWorkflowGenerateImproveBody }))
|
|
.output(zPostWorkflowGenerateImproveResponse)
|
|
|
|
export const improve = {
|
|
post,
|
|
}
|
|
|
|
/**
|
|
* Stream a Dify workflow graph (plan then result) via SSE
|
|
*/
|
|
export const post2 = oc
|
|
.route({
|
|
description: 'Stream a Dify workflow graph (plan then result) via SSE',
|
|
inputStructure: 'detailed',
|
|
method: 'POST',
|
|
operationId: 'postWorkflowGenerateStream',
|
|
path: '/workflow-generate/stream',
|
|
tags: ['console'],
|
|
})
|
|
.input(z.object({ body: zPostWorkflowGenerateStreamBody }))
|
|
.output(zPostWorkflowGenerateStreamResponse)
|
|
|
|
export const stream = {
|
|
post: post2,
|
|
}
|
|
|
|
/**
|
|
* Suggest example workflow-generator instructions for the tenant
|
|
*/
|
|
export const post3 = oc
|
|
.route({
|
|
description: 'Suggest example workflow-generator instructions for the tenant',
|
|
inputStructure: 'detailed',
|
|
method: 'POST',
|
|
operationId: 'postWorkflowGenerateSuggestions',
|
|
path: '/workflow-generate/suggestions',
|
|
tags: ['console'],
|
|
})
|
|
.input(z.object({ body: zPostWorkflowGenerateSuggestionsBody }))
|
|
.output(zPostWorkflowGenerateSuggestionsResponse)
|
|
|
|
export const suggestions = {
|
|
post: post3,
|
|
}
|
|
|
|
/**
|
|
* Generate a Dify workflow graph from natural language
|
|
*/
|
|
export const post4 = oc
|
|
.route({
|
|
description: 'Generate a Dify workflow graph from natural language',
|
|
inputStructure: 'detailed',
|
|
method: 'POST',
|
|
operationId: 'postWorkflowGenerate',
|
|
path: '/workflow-generate',
|
|
tags: ['console'],
|
|
})
|
|
.input(z.object({ body: zPostWorkflowGenerateBody }))
|
|
.output(zPostWorkflowGenerateResponse)
|
|
|
|
export const workflowGenerate = {
|
|
post: post4,
|
|
improve,
|
|
stream,
|
|
suggestions,
|
|
}
|
|
|
|
export const contract = {
|
|
workflowGenerate,
|
|
}
|