Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* GeneratorResponse
*/
export const zGeneratorResponse = z.unknown()
/**
* ErrorResponse
*
* Documented non-2xx body emitted by ``register_external_error_handlers``.
*
* ``params`` and ``details`` appear only on the errors that set them. The schema
* stays open because ``HTTPException.data`` may carry extra keys.
*/
export const zErrorResponse = z.object({
code: z.string(),
details: z.record(z.string(), z.unknown()).optional(),
message: z.string(),
params: z.string().optional(),
status: z.int(),
})
/**
* CompletionRequestError
*
* Completion request failed.
*/
export const zCompletionRequestError = zErrorResponse.and(
z.object({
code: z.literal('completion_request_error'),
status: z.literal(400),
}),
)
/**
* ModelCurrentlyNotSupportError
*
* Dify Hosted OpenAI trial currently not support the GPT-4 model.
*/
export const zModelCurrentlyNotSupportError = zErrorResponse.and(
z.object({
code: z.literal('model_currently_not_support'),
status: z.literal(400),
}),
)
/**
* ProviderNotInitializeError
*
* No valid model provider credentials found. Please go to Settings -> Model Provider to complete your provider credentials.
*/
export const zProviderNotInitializeError = zErrorResponse.and(
z.object({
code: z.literal('provider_not_initialize'),
status: z.literal(400),
}),
)
/**
* ProviderQuotaExceededError
*
* Your quota for Dify Hosted Model Provider has been exhausted. Please go to Settings -> Model Provider to complete your own provider credentials.
*/
export const zProviderQuotaExceededError = zErrorResponse.and(
z.object({
code: z.literal('provider_quota_exceeded'),
status: z.literal(400),
}),
)
/**
* 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(),
})
/**
* RuleCodeGeneratePayload
*/
export const zRuleCodeGeneratePayload = z.object({
code_language: z.string().optional().default('javascript'),
instruction: z.string(),
model_config: zModelConfig,
no_variable: z.boolean().optional().default(false),
})
export const zPostRuleCodeGenerateBody = zRuleCodeGeneratePayload
/**
* Code rules generated successfully
*/
export const zPostRuleCodeGenerateResponse = zGeneratorResponse