-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#9 fix Message List 查询,缺少参数 [run_id]
- Loading branch information
Showing
5 changed files
with
75 additions
and
9 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
api/src/main/java/com/theokanning/openai/assistants/message/MessageListSearchParameters.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,58 @@ | ||
package com.theokanning.openai.assistants.message; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.theokanning.openai.ListSearchParameters; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
/** | ||
* @author LiangTao | ||
* @date 2024年05月09 16:05 | ||
**/ | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class MessageListSearchParameters { | ||
/** | ||
* A limit on the number of objects to be returned. | ||
* Limit can range between 1 and 100, and the default is 20 | ||
*/ | ||
|
||
Integer limit; | ||
|
||
/** | ||
* Sort order by the 'created_at' timestamp of the objects. | ||
* 'asc' for ascending order and 'desc' for descending order. | ||
*/ | ||
ListSearchParameters.Order order; | ||
|
||
/** | ||
* A cursor for use in pagination. after is an object ID that defines your place in the list. | ||
* For instance, if you make a list request and receive 100 objects, ending with obj_foo, | ||
* your subsequent call can include after=obj_foo in order to fetch the next page of the list | ||
*/ | ||
String after; | ||
|
||
/** | ||
* A cursor for use in pagination. before is an object ID that defines your place in the list. | ||
* For instance, if you make a list request and receive 100 objects, ending with obj_foo, | ||
* your subsequent call can include before=obj_foo in order to fetch the previous page of the list. | ||
*/ | ||
String before; | ||
/** | ||
* Filter messages by the run ID that generated them. | ||
*/ | ||
@JsonProperty("run_id") | ||
private String runId; | ||
|
||
public enum Order { | ||
@JsonProperty("asc") | ||
ASCENDING, | ||
|
||
@JsonProperty("desc") | ||
DESCENDING | ||
} | ||
} |
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