Files
spring-ai-demo/application.properties.template

149 lines
6.1 KiB
Plaintext
Raw Permalink 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.
# ============================================================================
# Fintec AI Framework - 完整配置示例
# ============================================================================
# ============================================================================
# Agent 模块配置
# ============================================================================
# Agent 基础配置
fintec.ai.agent.default-system-prompt=你是一个专业的金融AI助手请用中文简洁准确地回答问题。回答时要专业、准确、有条理。
fintec.ai.agent.memory-window-size=30
fintec.ai.agent.stream-timeout-seconds=60
# 安全防护配置
fintec.ai.safety.enabled=true
fintec.ai.safety.block-keywords[0]=敏感词1
fintec.ai.safety.block-keywords[1]=敏感词2
fintec.ai.safety.block-keywords[2]=违规内容
# ============================================================================
# RAG 模块配置
# ============================================================================
# ============================================================================
# 限流配置Agent 和 MCP 模块使用)
# ============================================================================
# API 调用频率限制
fintec.ai.rate-limit.max-requests-per-minute=100
fintec.ai.rate-limit.max-tokens-per-request=8192
# ============================================================================
# 重试策略配置Agent 模块使用)
# ============================================================================
# 失败重试机制(处理网络波动、临时故障)
fintec.ai.retry.enabled=true
fintec.ai.retry.max-attempts=3
fintec.ai.retry.backoff-ms=1000
# ============================================================================
# Spring AI 底层配置(根据实际使用的模型调整)
# ============================================================================
# OpenAI 配置示例
spring.ai.openai.api-key=your-openai-api-key
spring.ai.openai.base-url=https://api.openai.com/v1
spring.ai.openai.chat.options.model=gpt-4
spring.ai.openai.chat.options.temperature=0.7
spring.ai.openai.chat.options.max-tokens=2048
# 或者使用 Azure OpenAI
# spring.ai.azure.openai.api-key=your-azure-api-key
# spring.ai.azure.openai.endpoint=https://your-resource.openai.azure.com
# spring.ai.azure.openai.chat.options.deployment-name=gpt-4
# 或者使用国内大模型(如通义千问)
# spring.ai.dashscope.api-key=your-dashscope-api-key
# spring.ai.dashscope.chat.options.model=qwen-max
# ============================================================================
# 向量数据库配置RAG 模块需要)
# ============================================================================
# Chroma 向量数据库示例
# spring.ai.vectorstore.chroma.client.host=localhost
# spring.ai.vectorstore.chroma.client.port=8000
# spring.ai.vectorstore.chroma.collection-name=default_collection
# Milvus 向量数据库示例
# spring.ai.vectorstore.milvus.client.host=localhost
# spring.ai.vectorstore.milvus.client.port=19530
# spring.ai.vectorstore.milvus.collection-name=default_collection
# PGVector (PostgreSQL) 示例
# spring.datasource.url=jdbc:postgresql://localhost:5432/rag_db
# spring.datasource.username=postgres
# spring.datasource.password=postgres
# spring.ai.vectorstore.pgvector.initialize-schema=true
# spring.ai.vectorstore.pgvector.index-type=HNSW
# spring.ai.vectorstore.pgvector.distance-type=COSINE_DISTANCE
# ============================================================================
# 对话记忆持久化配置(可选)
# ============================================================================
# 使用内存记忆(默认,无需配置)
# 如需使用 JDBC 持久化记忆,取消以下注释并配置数据源
# spring.datasource.url=jdbc:mysql://localhost:3306/ai_memory
# spring.datasource.username=root
# spring.datasource.password=password
# spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
# ============================================================================
# MCP Client 配置(如果作为 MCP Client 连接其他 MCP Server
# ============================================================================
# 静态 MCP Server 配置示例
# spring.ai.mcp.client.static-servers.my-server.type=SYNC
# spring.ai.mcp.client.static-servers.my-server.transport-type=SSE
# spring.ai.mcp.client.static-servers.my-server.url=http://localhost:8080/sse
# 或者使用 STDIO 传输
# spring.ai.mcp.client.static-servers.my-server.type=SYNC
# spring.ai.mcp.client.static-servers.my-server.transport-type=STDIO
# spring.ai.mcp.client.static-servers.my-server.command=npx
# spring.ai.mcp.client.static-servers.my-server.args=-y,@modelcontextprotocol/server-everything
# ============================================================================
# 日志配置(调试用)
# ============================================================================
# Spring AI 日志级别
logging.level.org.springframework.ai=DEBUG
logging.level.org.springframework.ai.chat.client.advisor=DEBUG
logging.level.com.ccb.fintec=DEBUG
# MCP 日志
logging.level.io.modelcontextprotocol=DEBUG
# ============================================================================
# 服务器配置
# ============================================================================
server.port=8080
server.servlet.context-path=/api
# ============================================================================
# Actuator 监控端点(生产环境建议启用)
# ============================================================================
management.endpoints.web.exposure.include=health,info,metrics,prometheus
management.endpoint.health.show-details=always
management.metrics.export.prometheus.enabled=true
# ============================================================================
# 自定义业务配置示例
# ============================================================================
# 应用信息
app.name=Fintec AI Demo
app.version=1.0.0
app.description=金融科技 AI 应用演示系统
# 业务特定的 AI 配置
app.ai.business.domain=finance
app.ai.business.language=zh-CN
app.ai.business.response-format=json