system.ts 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // 系统配置
  2. import {
  3. bluebookAiAgent,
  4. } from '@/lib/api/index'
  5. import request from '@/lib/module/axios.js'
  6. // 获取协议列表
  7. export type TAgreementItem = [
  8. {
  9. "link": string,
  10. "name": string
  11. }
  12. ]
  13. // type??
  14. export const getSysAgreements = () => {
  15. request.get<TAgreementItem>(`${bluebookAiAgent}api/v1/sys/agreements`)
  16. }
  17. // 获取个人最多允许创建N个智能体、智能助手二维码照片、录音文案等核心配置
  18. export type TSystemCoreCnf = {
  19. "assistantQrCode": string,
  20. "ossPrivateBucketName": string,
  21. "ossPublicBucketName": string,
  22. "personalMaxAgentNum": number,
  23. "systemVoiceList": {
  24. "avatar": string,
  25. "gender": string,
  26. "languages": string[],
  27. "platform": string,
  28. "style": string,
  29. "voiceId": string,
  30. "voiceName": string
  31. }[],
  32. "voiceText": "string"
  33. }
  34. export const getSysCoreCnf = () => {
  35. request.get<TSystemCoreCnf>(`${bluebookAiAgent}api/v1/sys/core/cnf`)
  36. }
  37. // 获取个人未创建智能体时的默认主页渲染内容
  38. export type TSystemDefaultPageContent = {
  39. "backgroundColor": string,
  40. "backgroundImage": string,
  41. "description": string,
  42. "subDescription": string,
  43. "subTitle": string,
  44. "title": string
  45. }
  46. export const getSysDefaultPageContent = () => {
  47. request.get<TSystemDefaultPageContent>(`${bluebookAiAgent}api/v1/sys/defaultPage/content`)
  48. }