Skip to content

Commit 88df28a

Browse files
committed
upate model
1 parent 329c091 commit 88df28a

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/main/java/com/javaaidev/text2sql/controller/ChatController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ public ChatResponse chat(@RequestBody ChatRequest request) {
2323
return new ChatResponse(
2424
chatClient.prompt().user(request.input())
2525
.options(OpenAiChatOptions.builder()
26-
.withModel(ChatModel.GPT_3_5_TURBO)
27-
.withTemperature(0.0)
28-
.withFunction("runSqlQuery")
26+
.model(ChatModel.GPT_4_O_MINI)
27+
.temperature(0.0)
28+
.function("runSqlQuery")
2929
.build())
3030
.call().content());
3131
}

src/main/resources/application.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ spring:
66
enabled: true
77
ai:
88
openai:
9-
api-key: ${OPENAI_API_KEY:}
10-
chat:
11-
options:
12-
model: gpt-4o-mini
13-
temperature: 0.0
9+
api-key: ${OPENAI_API_KEY:demo}
1410
datasource:
1511
url: jdbc:postgresql://localhost:5432/postgres
1612
username: postgres

0 commit comments

Comments
 (0)