Skip to content

armgit / dify

Public Imported from GitHub
0

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.

1.8 KB
Raw Blame
// This file is auto-generated by @hey-api/openapi-ts

import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
  zCompletionRequestError,
  zModelCurrentlyNotSupportError,
  zProviderNotInitializeError,
  zProviderQuotaExceededError,
} from './zod.gen.ts'
import {
  zPostInstructionGenerateBody,
  zPostInstructionGenerateResponse,
  zPostInstructionGenerateTemplateBody,
  zPostInstructionGenerateTemplateResponse,
} from './zod.gen.ts'

/**
 * Get instruction generation template
 */
export const post = oc
  .route({
    description: 'Get instruction generation template',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postInstructionGenerateTemplate',
    path: '/instruction-generate/template',
    tags: ['console'],
  })
  .input(z.object({ body: zPostInstructionGenerateTemplateBody }))
  .output(zPostInstructionGenerateTemplateResponse)

export const template = {
  post,
}

/**
 * Generate instruction for workflow nodes or general use
 */
export const post2 = oc
  .route({
    description: 'Generate instruction for workflow nodes or general use',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postInstructionGenerate',
    path: '/instruction-generate',
    tags: ['console'],
  })
  .input(z.object({ body: zPostInstructionGenerateBody }))
  .output(zPostInstructionGenerateResponse)
  .errors({
    completion_request_error: { status: 400, data: zCompletionRequestError },
    model_currently_not_support: { status: 400, data: zModelCurrentlyNotSupportError },
    provider_not_initialize: { status: 400, data: zProviderNotInitializeError },
    provider_quota_exceeded: { status: 400, data: zProviderQuotaExceededError },
  })

export const instructionGenerate = {
  post: post2,
  template,
}

export const contract = {
  instructionGenerate,
}