File tree Expand file tree Collapse file tree 4 files changed +87
-1
lines changed
api/src/main/java/com/theokanning/openai/assistants/run Expand file tree Collapse file tree 4 files changed +87
-1
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public class ToolCall {
3939 * For now, this is always going to be an empty object.
4040 */
4141 @ JsonProperty ("file_search" )
42- Map < String , String > fileSearch ;
42+ ToolCallFileSearch fileSearch ;
4343
4444 ToolCallFunction function ;
4545}
Original file line number Diff line number Diff line change 1+ package com .theokanning .openai .assistants .run ;
2+
3+ import com .fasterxml .jackson .annotation .JsonProperty ;
4+ import com .theokanning .openai .assistants .assistant .FileSearchRankingOptions ;
5+ import lombok .AllArgsConstructor ;
6+ import lombok .Builder ;
7+ import lombok .Data ;
8+ import lombok .NoArgsConstructor ;
9+
10+ import java .util .List ;
11+
12+ @ Data
13+ @ Builder
14+ @ NoArgsConstructor
15+ @ AllArgsConstructor
16+ public class ToolCallFileSearch {
17+ /**
18+ * The ranking options for the file search.
19+ */
20+ @ JsonProperty ("ranking_options" )
21+ private FileSearchRankingOptions rankingOptions ;
22+
23+ /**
24+ * The results of the file search.
25+ */
26+ private List <ToolCallFileSearchResult > results ;
27+ }
Original file line number Diff line number Diff line change 1+ package com .theokanning .openai .assistants .run ;
2+
3+ import com .fasterxml .jackson .annotation .JsonProperty ;
4+ import lombok .AllArgsConstructor ;
5+ import lombok .Builder ;
6+ import lombok .Data ;
7+ import lombok .NoArgsConstructor ;
8+
9+ import java .util .List ;
10+
11+ @ Data
12+ @ Builder
13+ @ NoArgsConstructor
14+ @ AllArgsConstructor
15+ public class ToolCallFileSearchResult {
16+ /**
17+ * The ID of the file that result was found in.
18+ */
19+ @ JsonProperty ("file_id" )
20+ private String fileId ;
21+
22+ /**
23+ * The name of the file that result was found in.
24+ */
25+ @ JsonProperty ("file_name" )
26+ private String fileName ;
27+
28+ /**
29+ * The score of the result. All values must be a floating point number between 0 and 1.
30+ */
31+ private Double score ;
32+
33+ /**
34+ * The content of the result that was found. The content is only included if requested via the include query parameter.
35+ */
36+ private List <ToolCallFileSearchResultContent > content ;
37+ }
Original file line number Diff line number Diff line change 1+ package com .theokanning .openai .assistants .run ;
2+
3+ import lombok .AllArgsConstructor ;
4+ import lombok .Builder ;
5+ import lombok .Data ;
6+ import lombok .NoArgsConstructor ;
7+
8+ @ Data
9+ @ Builder
10+ @ NoArgsConstructor
11+ @ AllArgsConstructor
12+ public class ToolCallFileSearchResultContent {
13+ /**
14+ * The type of the content.
15+ */
16+ private String type ;
17+
18+ /**
19+ * The text content of the file.
20+ */
21+ private String text ;
22+ }
You can’t perform that action at this time.
0 commit comments