Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add incomplete run status #763

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions run.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ type Run struct {

Temperature *float32 `json:"temperature,omitempty"`
// The maximum number of prompt tokens that may be used over the course of the run.
// If the run exceeds the number of prompt tokens specified, the run will end with status 'complete'.
// If the run exceeds the number of prompt tokens specified, the run will end with status 'incomplete'.
MaxPromptTokens int `json:"max_prompt_tokens,omitempty"`
// The maximum number of completion tokens that may be used over the course of the run.
// If the run exceeds the number of completion tokens specified, the run will end with status 'complete'.
// If the run exceeds the number of completion tokens specified, the run will end with status 'incomplete'.
MaxCompletionTokens int `json:"max_completion_tokens,omitempty"`
// ThreadTruncationStrategy defines the truncation strategy to use for the thread.
TruncationStrategy *ThreadTruncationStrategy `json:"truncation_strategy,omitempty"`
Expand All @@ -50,6 +50,7 @@ const (
RunStatusCancelling RunStatus = "cancelling"
RunStatusFailed RunStatus = "failed"
RunStatusCompleted RunStatus = "completed"
RunStatusIncomplete RunStatus = "incomplete"
RunStatusExpired RunStatus = "expired"
RunStatusCancelled RunStatus = "cancelled"
)
Expand Down Expand Up @@ -95,11 +96,11 @@ type RunRequest struct {
TopP *float32 `json:"top_p,omitempty"`

// The maximum number of prompt tokens that may be used over the course of the run.
// If the run exceeds the number of prompt tokens specified, the run will end with status 'complete'.
// If the run exceeds the number of prompt tokens specified, the run will end with status 'incomplete'.
MaxPromptTokens int `json:"max_prompt_tokens,omitempty"`

// The maximum number of completion tokens that may be used over the course of the run.
// If the run exceeds the number of completion tokens specified, the run will end with status 'complete'.
// If the run exceeds the number of completion tokens specified, the run will end with status 'incomplete'.
MaxCompletionTokens int `json:"max_completion_tokens,omitempty"`

// ThreadTruncationStrategy defines the truncation strategy to use for the thread.
Expand Down
Loading