baichuan.tsx 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. import { ProviderEnum } from '../declarations'
  2. import type { ProviderConfig } from '../declarations'
  3. import { BaichuanTextCn } from '@/app/components/base/icons/src/image/llm'
  4. import {
  5. Baichuan,
  6. BaichuanText,
  7. } from '@/app/components/base/icons/src/public/llm'
  8. const config: ProviderConfig = {
  9. selector: {
  10. name: {
  11. 'en': 'BAICHUAN AI',
  12. 'zh-Hans': '百川智能',
  13. },
  14. icon: <Baichuan className='w-full h-full' />,
  15. },
  16. item: {
  17. key: ProviderEnum.baichuan,
  18. titleIcon: {
  19. 'en': <BaichuanText className='w-[124px] h-6' />,
  20. 'zh-Hans': <BaichuanTextCn className='w-[100px] h-6' />,
  21. },
  22. },
  23. modal: {
  24. key: ProviderEnum.baichuan,
  25. title: {
  26. 'en': 'BAICHUAN AI',
  27. 'zh-Hans': '百川智能',
  28. },
  29. icon: <Baichuan className='w-6 h-6' />,
  30. link: {
  31. href: 'https://platform.baichuan-ai.com/console/apikey',
  32. label: {
  33. 'en': 'Get your API key from BAICHUAN AI',
  34. 'zh-Hans': '从百川智能获取 API Key',
  35. },
  36. },
  37. validateKeys: ['api_key', 'secret_key'],
  38. fields: [
  39. {
  40. type: 'text',
  41. key: 'api_key',
  42. required: true,
  43. label: {
  44. 'en': 'API Key',
  45. 'zh-Hans': 'API Key',
  46. },
  47. placeholder: {
  48. 'en': 'Enter your API key here',
  49. 'zh-Hans': '在此输入您的 API Key',
  50. },
  51. },
  52. {
  53. type: 'text',
  54. key: 'secret_key',
  55. required: true,
  56. label: {
  57. 'en': 'Secret Key',
  58. 'zh-Hans': 'Secret Key',
  59. },
  60. placeholder: {
  61. 'en': 'Enter your Secret key here',
  62. 'zh-Hans': '在此输入您的 Secret Key',
  63. },
  64. },
  65. ],
  66. },
  67. }
  68. export default config