-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat : convert from get to post endpoint
- Loading branch information
1 parent
4931dae
commit f988273
Showing
5 changed files
with
69 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...nai-llm/src/main/java/com/learning/ai/llmragwithspringai/model/request/AIChatRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.learning.ai.llmragwithspringai.model.request; | ||
|
||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.Pattern; | ||
import jakarta.validation.constraints.Size; | ||
import java.io.Serializable; | ||
|
||
public record AIChatRequest( | ||
@NotBlank(message = "Query cannot be empty") | ||
@Size(max = 800, message = "Query exceeds maximum length") | ||
@Pattern(regexp = "^[a-zA-Z0-9 ?]*$", message = "Invalid characters in query") | ||
String question) | ||
implements Serializable {} |
5 changes: 5 additions & 0 deletions
5
...i-llm/src/main/java/com/learning/ai/llmragwithspringai/model/response/AIChatResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.learning.ai.llmragwithspringai.model.response; | ||
|
||
import java.io.Serializable; | ||
|
||
public record AIChatResponse(String response) implements Serializable {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters