mirror of
https://github.com/langgenius/dify.git
synced 2026-06-07 16:32:01 +08:00
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import * as z from 'zod'
|
|
|
|
/**
|
|
* 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 = z.record(z.string(), z.unknown())
|