mirror of
https://github.com/langgenius/dify.git
synced 2026-06-16 14:01:10 +08:00
67 lines
1.4 KiB
TypeScript
67 lines
1.4 KiB
TypeScript
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import * as z from 'zod'
|
|
|
|
/**
|
|
* GeneratorResponse
|
|
*/
|
|
export const zGeneratorResponse = z.unknown()
|
|
|
|
/**
|
|
* InstructionTemplatePayload
|
|
*/
|
|
export const zInstructionTemplatePayload = z.object({
|
|
type: z.string(),
|
|
})
|
|
|
|
/**
|
|
* SimpleDataResponse
|
|
*/
|
|
export const zSimpleDataResponse = z.object({
|
|
data: z.string(),
|
|
})
|
|
|
|
/**
|
|
* 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(),
|
|
})
|
|
|
|
/**
|
|
* InstructionGeneratePayload
|
|
*/
|
|
export const zInstructionGeneratePayload = z.object({
|
|
current: z.string().optional().default(''),
|
|
flow_id: z.string(),
|
|
ideal_output: z.string().optional().default(''),
|
|
instruction: z.string(),
|
|
language: z.string().optional().default('javascript'),
|
|
model_config: zModelConfig,
|
|
node_id: z.string().optional().default(''),
|
|
})
|
|
|
|
export const zPostInstructionGenerateBody = zInstructionGeneratePayload
|
|
|
|
/**
|
|
* Instruction generated successfully
|
|
*/
|
|
export const zPostInstructionGenerateResponse = zGeneratorResponse
|
|
|
|
export const zPostInstructionGenerateTemplateBody = zInstructionTemplatePayload
|
|
|
|
/**
|
|
* Template retrieved successfully
|
|
*/
|
|
export const zPostInstructionGenerateTemplateResponse = zSimpleDataResponse
|