Merge pull request #20 from ktds-dg0501/feature/ai

ai-service application.yml 환경 변수를 static 값으로 변경
This commit is contained in:
SWPARK 2025-10-28 16:37:16 +09:00 committed by GitHub
commit 9438e0d285
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,11 +5,11 @@ spring:
# Redis Configuration
data:
redis:
host: ${REDIS_HOST:redis-external} # Production: redis-external, Local: 20.214.210.71
port: ${REDIS_PORT:6379}
password: ${REDIS_PASSWORD:}
database: ${REDIS_DATABASE:0} # AI Service uses database 3
timeout: ${REDIS_TIMEOUT:3000}
host: 20.214.210.71
port: 6379
password: Hi5Jessica!
database: 3
timeout: 3000
lettuce:
pool:
max-active: 8
@ -19,7 +19,7 @@ spring:
# Kafka Consumer Configuration
kafka:
bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS:localhost:9092}
bootstrap-servers: 4.230.50.63:9092
consumer:
group-id: ai-service-consumers
auto-offset-reset: earliest
@ -28,14 +28,14 @@ spring:
value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer
properties:
spring.json.trusted.packages: "*"
max.poll.records: ${KAFKA_MAX_POLL_RECORDS:10}
session.timeout.ms: ${KAFKA_SESSION_TIMEOUT:30000}
max.poll.records: 10
session.timeout.ms: 30000
listener:
ack-mode: manual
# Server Configuration
server:
port: ${SERVER_PORT:8083}
port: 8083
servlet:
context-path: /
encoding:
@ -45,17 +45,17 @@ server:
# JWT Configuration
jwt:
secret: ${JWT_SECRET:}
access-token-validity: ${JWT_ACCESS_TOKEN_VALIDITY:1800}
refresh-token-validity: ${JWT_REFRESH_TOKEN_VALIDITY:86400}
secret: kt-event-marketing-secret-key-for-development-only-please-change-in-production
access-token-validity: 604800000
refresh-token-validity: 86400
# CORS Configuration
cors:
allowed-origins: ${CORS_ALLOWED_ORIGINS:http://localhost:3000,http://localhost:8080}
allowed-methods: ${CORS_ALLOWED_METHODS:GET,POST,PUT,DELETE,OPTIONS,PATCH}
allowed-headers: ${CORS_ALLOWED_HEADERS:*}
allow-credentials: ${CORS_ALLOW_CREDENTIALS:true}
max-age: ${CORS_MAX_AGE:3600}
allowed-origins: http://localhost:*
allowed-methods: GET,POST,PUT,DELETE,OPTIONS,PATCH
allowed-headers: "*"
allow-credentials: true
max-age: 3600
# Actuator Configuration
management:
@ -100,7 +100,7 @@ logging:
console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
file: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
file:
name: ${LOG_FILE:logs/ai-service.log}
name: logs/ai-service.log
logback:
rollingpolicy:
max-file-size: 10MB
@ -110,26 +110,20 @@ logging:
# Kafka Topics Configuration
kafka:
topics:
ai-job: ${KAFKA_TOPIC_AI_JOB:ai-event-generation-job}
ai-job-dlq: ${KAFKA_TOPIC_AI_JOB_DLQ:ai-event-generation-job-dlq}
ai-job: ai-event-generation-job
ai-job-dlq: ai-event-generation-job-dlq
# AI External API Configuration
# AI API Configuration (실제 API 사용)
ai:
provider: CLAUDE
claude:
api-url: ${CLAUDE_API_URL:https://api.anthropic.com/v1/messages}
api-key: ${CLAUDE_API_KEY:}
anthropic-version: ${CLAUDE_ANTHROPIC_VERSION:2023-06-01}
model: ${CLAUDE_MODEL:claude-3-5-sonnet-20241022}
max-tokens: ${CLAUDE_MAX_TOKENS:4096}
temperature: ${CLAUDE_TEMPERATURE:0.7}
timeout: ${CLAUDE_TIMEOUT:300000} # 5 minutes
gpt4:
api-url: ${GPT4_API_URL:https://api.openai.com/v1/chat/completions}
api-key: ${GPT4_API_KEY:}
model: ${GPT4_MODEL:gpt-4-turbo-preview}
max-tokens: ${GPT4_MAX_TOKENS:4096}
timeout: ${GPT4_TIMEOUT:300000} # 5 minutes
provider: ${AI_PROVIDER:CLAUDE} # CLAUDE or GPT4
api-url: https://api.anthropic.com/v1/messages
api-key: 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
anthropic-version: 2023-06-01
model: claude-sonnet-4-5-20250929
max-tokens: 4096
temperature: 0.7
timeout: 300000
# Circuit Breaker Configuration
resilience4j:
@ -168,7 +162,7 @@ resilience4j:
# Redis Cache TTL Configuration (seconds)
cache:
ttl:
recommendation: ${CACHE_TTL_RECOMMENDATION:86400} # 24 hours
job-status: ${CACHE_TTL_JOB_STATUS:86400} # 24 hours
trend: ${CACHE_TTL_TREND:3600} # 1 hour
fallback: ${CACHE_TTL_FALLBACK:604800} # 7 days
recommendation: 86400 # 24 hours
job-status: 86400 # 24 hours
trend: 3600 # 1 hour
fallback: 604800 # 7 days