wenxin.tsx 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. import { ProviderEnum } from '../declarations'
  2. import type { ProviderConfig } from '../declarations'
  3. import { Wxyy, WxyyText, WxyyTextCn } from '@/app/components/base/icons/src/image/llm'
  4. const config: ProviderConfig = {
  5. selector: {
  6. name: {
  7. 'en': 'WENXIN YIYAN',
  8. 'zh-Hans': '文心一言',
  9. },
  10. icon: <Wxyy className='w-full h-full' />,
  11. },
  12. item: {
  13. key: ProviderEnum.wenxin,
  14. titleIcon: {
  15. 'en': <WxyyText className='w-[124px] h-6' />,
  16. 'zh-Hans': <WxyyTextCn className='w-[100px] h-6' />,
  17. },
  18. },
  19. modal: {
  20. key: ProviderEnum.wenxin,
  21. title: {
  22. 'en': 'WENXINYIYAN',
  23. 'zh-Hans': '文心一言',
  24. },
  25. icon: <Wxyy className='w-6 h-6' />,
  26. link: {
  27. href: 'https://console.bce.baidu.com/qianfan/ais/console/applicationConsole/application',
  28. label: {
  29. 'en': 'Get your API key from Baidu',
  30. 'zh-Hans': '从百度获取 API Key',
  31. },
  32. },
  33. validateKeys: ['api_key', 'secret_key'],
  34. fields: [
  35. {
  36. type: 'text',
  37. key: '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. type: 'text',
  50. key: 'secret_key',
  51. required: true,
  52. label: {
  53. 'en': 'Secret Key',
  54. 'zh-Hans': 'Secret Key',
  55. },
  56. placeholder: {
  57. 'en': 'Enter your Secret key here',
  58. 'zh-Hans': '在此输入您的 Secret Key',
  59. },
  60. },
  61. ],
  62. },
  63. }
  64. export default config