mirror of
https://github.com/langgenius/dify.git
synced 2026-06-14 12:51:07 +08:00
50 lines
1.2 KiB
TypeScript
50 lines
1.2 KiB
TypeScript
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import * as z from 'zod'
|
|
|
|
/**
|
|
* GeneratorResponse
|
|
*/
|
|
export const zGeneratorResponse = z.unknown()
|
|
|
|
/**
|
|
* LLMMode
|
|
*
|
|
* Enum class for large language model mode.
|
|
*/
|
|
export const zLlmMode = z.enum(['chat', 'completion'])
|
|
|
|
/**
|
|
* ModelConfig
|
|
*/
|
|
export const zModelConfig = z.object({
|
|
completion_params: z.record(z.string(), z.unknown()).optional(),
|
|
mode: zLlmMode,
|
|
name: z.string(),
|
|
provider: z.string(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowGeneratePayload
|
|
*
|
|
* Payload for the cmd+k `/create` and `/refine` workflow generator endpoint.
|
|
*
|
|
* See ``services/workflow_generator_service.py`` for behaviour. Errors are
|
|
* surfaced through the same envelope as ``/rule-generate`` so the frontend
|
|
* can reuse its existing handler.
|
|
*/
|
|
export const zWorkflowGeneratePayload = z.object({
|
|
current_graph: z.record(z.string(), z.unknown()).nullish(),
|
|
ideal_output: z.string().optional().default(''),
|
|
instruction: z.string(),
|
|
mode: z.enum(['advanced-chat', 'workflow']),
|
|
model_config: zModelConfig,
|
|
})
|
|
|
|
export const zPostWorkflowGenerateBody = zWorkflowGeneratePayload
|
|
|
|
/**
|
|
* Workflow graph generated successfully
|
|
*/
|
|
export const zPostWorkflowGenerateResponse = zGeneratorResponse
|