This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Easier to make separate objects for getting, creating, and modifying Assistants in case the parameters diverge later.
- Loading branch information
1 parent
bc81a29
commit f223175
Showing
8 changed files
with
122 additions
and
52 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
48 changes: 47 additions & 1 deletion
48
api/src/main/java/com/theokanning/openai/assistants/AssistantRequest.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 |
---|---|---|
@@ -1,6 +1,52 @@ | ||
package com.theokanning.openai.assistants; | ||
|
||
|
||
public class AssistantRequest extends AssistantBase { | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.*; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Data | ||
public class AssistantRequest { | ||
|
||
/** | ||
* ID of the model to use | ||
*/ | ||
@NonNull | ||
String model; | ||
|
||
/** | ||
* The name of the assistant. The maximum length is 256 | ||
*/ | ||
String name; | ||
|
||
/** | ||
* The description of the assistant. | ||
*/ | ||
String description; | ||
|
||
/** | ||
* The system instructions that the assistant uses. | ||
*/ | ||
String instructions; | ||
|
||
/** | ||
* A list of tools enabled on the assistant. | ||
*/ | ||
List<Tool> tools; | ||
|
||
/** | ||
* A list of file IDs attached to this assistant. | ||
*/ | ||
@JsonProperty("file_ids") | ||
List<String> fileIds; | ||
|
||
/** | ||
* Set of 16 key-value pairs that can be attached to an object. | ||
*/ | ||
Map<String, String> metadata; | ||
} |
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
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