tongyi.tsx 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import { ProviderEnum } from '../declarations'
  2. import type { ProviderConfig } from '../declarations'
  3. import { Tongyi, TongyiText, TongyiTextCn } from '@/app/components/base/icons/src/image/llm'
  4. const config: ProviderConfig = {
  5. selector: {
  6. name: {
  7. 'en': 'TONGYI QIANWEN',
  8. 'zh-Hans': '通义千问',
  9. },
  10. icon: <Tongyi className='w-full h-full' />,
  11. },
  12. item: {
  13. key: ProviderEnum.tongyi,
  14. titleIcon: {
  15. 'en': <TongyiText className='w-[88px] h-6' />,
  16. 'zh-Hans': <TongyiTextCn className='w-[100px] h-6' />,
  17. },
  18. },
  19. modal: {
  20. key: ProviderEnum.tongyi,
  21. title: {
  22. 'en': 'Tongyi',
  23. 'zh-Hans': '通义千问',
  24. },
  25. icon: <Tongyi className='w-6 h-6' />,
  26. link: {
  27. href: 'https://dashscope.console.aliyun.com/api-key_management',
  28. label: {
  29. 'en': 'Get your API key from AliCloud',
  30. 'zh-Hans': '从阿里云获取 API Key',
  31. },
  32. },
  33. validateKeys: ['dashscope_api_key'],
  34. fields: [
  35. {
  36. type: 'text',
  37. key: 'dashscope_api_key',
  38. required: true,
  39. label: {
  40. 'en': 'API Key',
  41. 'zh-Hans': 'API Key',
  42. },
  43. placeholder: {
  44. 'en': 'Enter your API key here',
  45. 'zh-Hans': '在此输入您的 API Key',
  46. },
  47. },
  48. ],
  49. },
  50. }
  51. export default config