cohere.tsx 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import { ProviderEnum } from '../declarations'
  2. import type { ProviderConfig } from '../declarations'
  3. import { Cohere, CohereText } from '@/app/components/base/icons/src/public/llm'
  4. const config: ProviderConfig = {
  5. selector: {
  6. name: {
  7. 'en': 'cohere',
  8. 'zh-Hans': 'cohere',
  9. },
  10. icon: <Cohere className='w-full h-full' />,
  11. },
  12. item: {
  13. key: ProviderEnum.cohere,
  14. titleIcon: {
  15. 'en': <CohereText className='w-[120px] h-6' />,
  16. 'zh-Hans': <CohereText className='w-[120px] h-6' />,
  17. },
  18. },
  19. modal: {
  20. key: ProviderEnum.cohere,
  21. title: {
  22. 'en': 'cohere',
  23. 'zh-Hans': 'cohere',
  24. },
  25. icon: <Cohere className='w-6 h-6' />,
  26. link: {
  27. href: 'https://dashboard.cohere.com/api-keys',
  28. label: {
  29. 'en': 'Get your API key from cohere',
  30. 'zh-Hans': '从 cohere 获取 API Key',
  31. },
  32. },
  33. validateKeys: ['api_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. },
  50. }
  51. export default config