zhipuai.tsx 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import { ProviderEnum } from '../declarations'
  2. import type { ProviderConfig } from '../declarations'
  3. import { Zhipuai, ZhipuaiText, ZhipuaiTextCn } from '@/app/components/base/icons/src/public/llm'
  4. const config: ProviderConfig = {
  5. selector: {
  6. name: {
  7. 'en': 'ZHIPU AI',
  8. 'zh-Hans': '智谱 AI',
  9. },
  10. icon: <Zhipuai className='w-full h-full' />,
  11. },
  12. item: {
  13. key: ProviderEnum.zhipuai,
  14. titleIcon: {
  15. 'en': <ZhipuaiText className='-ml-1 h-7' />,
  16. 'zh-Hans': <ZhipuaiTextCn className='h-8' />,
  17. },
  18. },
  19. modal: {
  20. key: ProviderEnum.zhipuai,
  21. title: {
  22. 'en': 'ZHIPU AI',
  23. 'zh-Hans': '智谱 AI',
  24. },
  25. icon: <Zhipuai className='w-6 h-6' />,
  26. link: {
  27. href: 'https://open.bigmodel.cn/usercenter/apikeys',
  28. label: {
  29. 'en': 'Get your API key from ZHIPU AI',
  30. 'zh-Hans': '从智谱 AI 获取 API Key',
  31. },
  32. },
  33. validateKeys: [
  34. 'api_key',
  35. ],
  36. fields: [
  37. {
  38. type: 'text',
  39. key: 'api_key',
  40. required: true,
  41. label: {
  42. 'en': 'APIKey',
  43. 'zh-Hans': 'APIKey',
  44. },
  45. placeholder: {
  46. 'en': 'Enter your APIKey here',
  47. 'zh-Hans': '在此输入您的 APIKey',
  48. },
  49. },
  50. ],
  51. },
  52. }
  53. export default config