-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
68 additions
and
10 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
api/src/main/java/com/theokanning/openai/assistants/assistant/FileSearch.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,30 @@ | ||
package com.theokanning.openai.assistants.assistant; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
/** | ||
* @author LiangTao | ||
* @date 2024年09月19 10:53 | ||
**/ | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class FileSearch { | ||
/** | ||
* The maximum number of results the file search tool should output. The default is 20 for gpt-4* models and 5 for gpt-3.5-turbo. This number should be between 1 and 50 inclusive. | ||
*/ | ||
@JsonProperty("max_num_results") | ||
Integer maxNumResults; | ||
|
||
/** | ||
* The ranking options for the file search. If not specified, the file search tool will use the auto ranker and a score_threshold of 0. | ||
*/ | ||
@JsonProperty("ranking_options") | ||
FileSearchRankingOptions rankingOptions; | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
api/src/main/java/com/theokanning/openai/assistants/assistant/FileSearchRankingOptions.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,30 @@ | ||
package com.theokanning.openai.assistants.assistant; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.validation.constraints.NotNull; | ||
|
||
/** | ||
* @author LiangTao | ||
* @date 2024年09月19 10:36 | ||
**/ | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class FileSearchRankingOptions { | ||
/** | ||
* The ranker to use for the file search. If not specified will use the auto ranker. | ||
*/ | ||
String ranker; | ||
|
||
/** | ||
* The score threshold for the file search. All values must be a floating point number between 0 and 1. | ||
*/ | ||
@NotNull | ||
@JsonProperty("score_threshold") | ||
Double scoreThreshold; | ||
|
||
} |
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
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