import type { VbenFormProps } from "@vben/common-ui";

export const ModelCertificateFrom: VbenFormProps = {
  schema: [
    {
      fieldName: 'CertificateType',
      label: '凭证类型',
      component: "Select",
      componentProps: {
        options: [
          { label: 'API密钥', value: 'apiKey' },
          { label: '其他', value: 'other' },
        ]
      },
    },
    {
      fieldName: "modelName",
      label: "模型名称",
      component: "Input",
      rules: "required",
      dependencies: {
        triggerFields: ["CertificateType"],
        show: (values) => values.CertificateType === 'other',
      },
    },
    {
      fieldName: "modelType",
      label: "模型类型",
      component: "Select",
      componentProps: {
        options: [
          { label: 'LLM', value: 'llm' },
          { label: 'Text Embedding', value: 'textEmbedding' },
          { label: 'Rerank', value: 'rerank' },
        ]
      },
      dependencies: {
        triggerFields: ["CertificateType"],
        show: (values) => values.CertificateType === 'other',
      },
    }
  ]
};
