application.yml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. spring:
  2. application:
  3. name: pharmacopoeia-ai
  4. datasource:
  5. url: jdbc:postgresql://localhost:5432/pharmacopoeia
  6. username: postgres
  7. password: pharma2025
  8. driver-class-name: org.postgresql.Driver
  9. jpa:
  10. hibernate:
  11. ddl-auto: none
  12. show-sql: false
  13. properties:
  14. hibernate:
  15. dialect: org.hibernate.dialect.PostgreSQLDialect
  16. format_sql: true
  17. data:
  18. redis:
  19. host: localhost
  20. port: 6379
  21. jackson:
  22. serialization:
  23. write-dates-as-timestamps: false
  24. servlet:
  25. multipart:
  26. max-file-size: 50MB
  27. max-request-size: 55MB
  28. server:
  29. port: 9000
  30. # ============================================
  31. # Qwen API 配置
  32. # ============================================
  33. qwen:
  34. api-key: ${QWEN_API_KEY:}
  35. base-url: https://dashscope.aliyuncs.com/compatible-mode/v1
  36. model: qwen3.7-max
  37. max-tokens: 4096
  38. temperature: 0.0
  39. # 视觉模型(图片分析+OCR)
  40. # 多模态模型(图片/视频分析,原生 API)
  41. vl-model: qwen3.7-plus
  42. multimodal-url: https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation
  43. enable-web-search: true
  44. # 嵌入模型
  45. embedding-model: text-embedding-v3
  46. embedding-url: https://dashscope.aliyuncs.com/api/v1/services/embeddings/text-embedding/text-embedding
  47. embedding-dim: 1024
  48. # ============================================
  49. # 鉴权
  50. # ============================================
  51. auth:
  52. enabled: true # 上线后改为 true
  53. admin-token: "" # 运营端管理 token(与 JWT 无关,单独配置)
  54. # ============================================
  55. # JWT
  56. # ============================================
  57. jwt:
  58. secret: YourSuperSecretKeyForJWTTokenGenerationMustBeAtLeast256BitsLong!!
  59. expiration: 86400000 # 24小时 (ms)
  60. # ============================================
  61. # 微信小程序
  62. # ============================================
  63. wechat:
  64. app-id: ${WECHAT_APPID:}
  65. secret: ${WECHAT_SECRET:}
  66. # ============================================
  67. # 百炼(DashScope)API 全局限流
  68. # 控制后端 → 百炼的总调用量,与用户侧限流独立
  69. # 最终是否限制、限制多少由客户确认后配置
  70. # ============================================
  71. dashscope:
  72. rate-limit:
  73. enabled: false # 客户确认后改为 true
  74. per-minute: 100
  75. per-hour: 2000
  76. per-day: 50000
  77. # ============================================
  78. # 限流
  79. # ============================================
  80. rate-limit:
  81. per-minute: 200
  82. per-hour: 50000
  83. per-day: 20000
  84. logging:
  85. level:
  86. com.pharmacopoeia: INFO
  87. org.springframework.web: WARN
  88. file:
  89. path: ${LOG_DIR:/var/log/pharmacopoeia}