Skip to content

Commit

Permalink
feat: add incomplete run status (sashabaranov#763)
Browse files Browse the repository at this point in the history
  • Loading branch information
shosato0306 authored Jun 5, 2024
1 parent 30cf7b8 commit 8618492
Showing 1 changed file with 5 additions and 4 deletions.
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

0 comments on commit 8618492

Please sign in to comment.