Files
spring-ai-demo/rag-demo/src/main/resources/application.properties

43 lines
1.6 KiB
Properties
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ============================================
# 服务器配置
# ============================================
server.port=8082
# ============================================
# 模型配置(使用 OpenRouter与 agent-demo 一致)
# ============================================
spring.ai.openai.api-key=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
spring.ai.openai.base-url=https://openrouter.ai/api
spring.ai.openai.chat.options.model=openrouter/free
# Embedding 模型也使用 OpenRouter通过 OpenAI 兼容接口)
spring.ai.openai.embedding.options.model=text-embedding-3-small
# ============================================
# RAG 模块配置
# ============================================
# 文档分块大小(字符数):影响检索精度和上下文长度
fintec.ai.rag.chunk-size=800
# 分块重叠大小:保证上下文连贯性
fintec.ai.rag.chunk-overlap=100
# 检索返回的最相关文档数量
fintec.ai.rag.top-k=5
# 相似度阈值:低于此值的文档不会被使用
fintec.ai.rag.similarity-threshold=0.7
# ============================================
# 重试策略配置(可选)
# ============================================
# fintec.ai.retry.enabled=true
# fintec.ai.retry.max-attempts=3
# fintec.ai.retry.backoff-ms=1000
# ============================================
# 日志配置
# ============================================
logging.level.root=INFO
logging.level.com.ccb.fintec=DEBUG
# 启用 Spring Boot 自动配置的调试信息
debug=true
# 启用更详细的日志
logging.level.org.springframework.boot.autoconfigure=DEBUG