Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Eureka and Config Server for Chat-Agent and use stable 1.0.0-M2 package version #62

Merged
merged 6 commits into from
Sep 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
centralize agent config
Hao Zhang committed Sep 25, 2024
commit 3b29f248e4c9449f7890abf184b917c098873de9
35 changes: 35 additions & 0 deletions config/chat-agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
spring:
sql:
init:
schema-locations: classpath*:db/h2/schema.sql
data-locations: classpath*:db/h2/data.sql
# Web
thymeleaf:
mode: HTML
# Maximum time static resources should be cached
web:
resources:
cache:
cachecontrol:
max-age: 12h
# Spring AI
ai:
azure:
openai:
endpoint: <your-azure-open-ai-endpoint>
client-id: <your-managed-identity-client-id>
chat:
options:
deployment-name: gpt-4o
temperature: 0.8
embedding:
options:
deployment-name: text-embedding-ada-002
chat:
client:
enabled: true

# PetClinic Agent
petclinic:
agent:
name: petclinic agent
66 changes: 4 additions & 62 deletions src/spring-petclinic-chat-agent/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,5 @@
# Database init, supports mysql too
database: h2

spring:
sql:
init:
schema-locations: classpath*:db/${database}/schema.sql
data-locations: classpath*:db/${database}/data.sql

# Web
thymeleaf:
mode: HTML

# JPA
jpa:
hibernate:
ddl-auto: none
open-in-view: true

# Internationalization
messages:
basename: messages/messages

# Maximum time static resources should be cached
web:
resources:
cache:
cachecontrol:
max-age: 12h

# Logging
logging:
level:
org:
springframework: INFO

ai:
azure:
openai:
endpoint: <your-azure-open-ai-endpoint>
client-id: <your-managed-identity-client-id>
chat:
options:
deployment-name: gpt-4o
temperature: 0.8
embedding:
options:
deployment-name: text-embedding-ada-002
chat:
client:
enabled: true

# PetClinic Agent
petclinic:
agent:
name: petclinic agent

# Actuator
management:
endpoints:
web:
exposure:
include: "*"
application:
name: chat-agent
config:
import: optional:configserver:${CONFIG_SERVER_URL:http://localhost:8888/}