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.
* 390 Added runs * 390 Added runs --------- Co-authored-by: Theo Kanning <[email protected]>
- Loading branch information
1 parent
99162e0
commit 4ff2758
Showing
11 changed files
with
295 additions
and
17 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
api/src/main/java/com/theokanning/openai/runs/MessageCreation.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,16 @@ | ||
package com.theokanning.openai.runs; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Data | ||
public class MessageCreation { | ||
@JsonProperty("message_id") | ||
String messageId; | ||
} |
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,45 @@ | ||
package com.theokanning.openai.runs; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Data | ||
public class Run { | ||
|
||
@JsonProperty("assistant_id") | ||
String assistantId; | ||
@JsonProperty("cancelled_at") | ||
Long cancelledAt; | ||
@JsonProperty("completed_at") | ||
Long completedAt; | ||
@JsonProperty("created_at") | ||
Long createdAt; | ||
@JsonProperty("expires_at") | ||
Long expiresAt; | ||
@JsonProperty("failed_at") | ||
Long failedAt; | ||
@JsonProperty("file_ids") | ||
List<String> fileIds; | ||
String id; | ||
String instructions; | ||
@JsonProperty("last_error") | ||
String lastError; | ||
Map<String, String> metadata; | ||
String model; | ||
String object; | ||
@JsonProperty("started_at") | ||
Long startedAt; | ||
String status; | ||
@JsonProperty("thread_id") | ||
String threadId; | ||
List<Tool> tools; | ||
} |
23 changes: 23 additions & 0 deletions
23
api/src/main/java/com/theokanning/openai/runs/RunCreateRequest.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,23 @@ | ||
package com.theokanning.openai.runs; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Data | ||
public class RunCreateRequest { | ||
String assistantId; | ||
|
||
// Optional | ||
String model; | ||
String instructions; | ||
List<Tool> tools; | ||
Map<String, String> metadata; | ||
} |
39 changes: 39 additions & 0 deletions
39
api/src/main/java/com/theokanning/openai/runs/RunStep.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,39 @@ | ||
package com.theokanning.openai.runs; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Data | ||
public class RunStep { | ||
|
||
@JsonProperty("assistant_id") | ||
String assistantId; | ||
@JsonProperty("canelled_at") | ||
Long cancelledAt; | ||
@JsonProperty("completed_at") | ||
Long completedAt; | ||
@JsonProperty("created_at") | ||
Long createdAt; | ||
@JsonProperty("expired_at") | ||
Long expiredAt; | ||
@JsonProperty("failed_at") | ||
Long failedAt; | ||
String id; | ||
@JsonProperty("last_error") | ||
String lastError; | ||
String object; | ||
@JsonProperty("run_id") | ||
String runId; | ||
String status; | ||
@JsonProperty("step_details") | ||
StepDetails stepDetails; | ||
@JsonProperty("thread_id") | ||
String threadId; | ||
String type; | ||
} |
17 changes: 17 additions & 0 deletions
17
api/src/main/java/com/theokanning/openai/runs/RunSteps.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,17 @@ | ||
package com.theokanning.openai.runs; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.util.List; | ||
|
||
public class RunSteps { | ||
|
||
String object; | ||
List<RunSteps> data; | ||
@JsonProperty("first_id") | ||
String firstId; | ||
@JsonProperty("last_id") | ||
String lastId; | ||
@JsonProperty("has_more") | ||
boolean hasMore; | ||
} |
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,17 @@ | ||
package com.theokanning.openai.runs; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.util.List; | ||
|
||
public class Runs { | ||
|
||
String object; | ||
List<Runs> data; | ||
@JsonProperty("first_id") | ||
String firstId; | ||
@JsonProperty("last_id") | ||
String lastId; | ||
@JsonProperty("has_more") | ||
boolean hasMore; | ||
} |
18 changes: 18 additions & 0 deletions
18
api/src/main/java/com/theokanning/openai/runs/StepDetails.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,18 @@ | ||
package com.theokanning.openai.runs; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Data | ||
public class StepDetails { | ||
|
||
@JsonProperty("message_creation") | ||
MessageCreation messageCreation; | ||
String type; | ||
} |
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,15 @@ | ||
package com.theokanning.openai.runs; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Data | ||
public class Tool { | ||
|
||
String type; | ||
} |
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
Oops, something went wrong.