| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
OpenAI.V1.Threads.Runs.Steps
Contents
Description
/v1/threads/:thread_id/runs/:run_id/steps
Synopsis
- newtype StepID = StepID {}
- data RunStepObject = RunStepObject {
- id :: StepID
- object :: Text
- created_at :: POSIXTime
- assistant_id :: AssistantID
- thread_id :: ThreadID
- run_id :: RunID
- status :: Status
- step_details :: StepDetails
- last_error :: Maybe Error
- expired_at :: Maybe POSIXTime
- cancelled_at :: Maybe POSIXTime
- failed_at :: Maybe POSIXTime
- completed_at :: Maybe POSIXTime
- metadata :: Map Text Text
- usage :: Maybe (Usage CompletionTokensDetails PromptTokensDetails)
- data Status
- data Image = Image {}
- data Output
- = Output_Logs { }
- | Output_Image { }
- data CodeInterpreter = CodeInterpreter {}
- data RankingOptions = RankingOptions {
- ranker :: Text
- score_threshold :: Double
- data Content = Content {}
- data Result = Result {}
- data FileSearch = FileSearch {
- ranking_options :: RankingOptions
- results :: Vector Result
- data Function = Function {}
- data ToolCall
- = ToolCall_Code_Interpreter { }
- | ToolCall_File_Search {
- id :: Text
- file_search :: Map Text FileSearch
- | ToolCall_Function { }
- data StepDetails
- = Message_Creation { }
- | Tool_Calls {
- tool_calls :: Vector ToolCall
- type API = "threads" :> (Header' '[Required, Strict] "OpenAI-Beta" Text :> ((Capture "thread_id" ThreadID :> ("runs" :> (Capture "run_id" RunID :> ("steps" :> (QueryParam "limit" Natural :> (QueryParam "order" Order :> (QueryParam "after" Text :> (QueryParam "before" Text :> (QueryParam "include[]" Text :> Get '[JSON] (ListOf RunStepObject)))))))))) :<|> (Capture "thread_id" ThreadID :> ("runs" :> (Capture "run_id" RunID :> ("steps" :> (Capture "step_id" StepID :> (QueryParam "include[]" Text :> Get '[JSON] RunStepObject))))))))
Main types
Step ID
Instances
| FromJSON StepID Source # | |
Defined in OpenAI.V1.Threads.Runs.Steps | |
| ToJSON StepID Source # | |
| IsString StepID Source # | |
Defined in OpenAI.V1.Threads.Runs.Steps Methods fromString :: String -> StepID # | |
| Show StepID Source # | |
| ToHttpApiData StepID Source # | |
Defined in OpenAI.V1.Threads.Runs.Steps Methods toUrlPiece :: StepID -> Text # toEncodedUrlPiece :: StepID -> Builder # toHeader :: StepID -> ByteString # toQueryParam :: StepID -> Text # toEncodedQueryParam :: StepID -> Builder # | |
data RunStepObject Source #
Represents a step in execution of a run.
Constructors
| RunStepObject | |
Fields
| |
Instances
Other types
The status of the run step
Constructors
| In_Progress | |
| Cancelled | |
| Failed | |
| Completed | |
| Expired |
Instances
| FromJSON Status Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps | |||||
| ToJSON Status Source # | |||||
| Generic Status Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps Associated Types
| |||||
| Show Status Source # | |||||
| type Rep Status Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps type Rep Status = D1 ('MetaData "Status" "OpenAI.V1.Threads.Runs.Steps" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) ((C1 ('MetaCons "In_Progress" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Cancelled" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Failed" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Completed" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Expired" 'PrefixI 'False) (U1 :: Type -> Type)))) | |||||
Code Interpreter image output
Instances
| FromJSON Image Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps | |||||
| ToJSON Image Source # | |||||
| Generic Image Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps Associated Types
| |||||
| Show Image Source # | |||||
| type Rep Image Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps | |||||
An output from the Code Interpreter tool call
Constructors
| Output_Logs | |
| Output_Image | |
Instances
| FromJSON Output Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps | |||||
| ToJSON Output Source # | |||||
| Generic Output Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps Associated Types
| |||||
| Show Output Source # | |||||
| type Rep Output Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps type Rep Output = D1 ('MetaData "Output" "OpenAI.V1.Threads.Runs.Steps" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "Output_Logs" 'PrefixI 'True) (S1 ('MetaSel ('Just "logs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "Output_Image" 'PrefixI 'True) (S1 ('MetaSel ('Just "image") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Image))) | |||||
data CodeInterpreter Source #
A Code Interpreter tool call
Constructors
| CodeInterpreter | |
Instances
| FromJSON CodeInterpreter Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps Methods parseJSON :: Value -> Parser CodeInterpreter # parseJSONList :: Value -> Parser [CodeInterpreter] # | |||||
| ToJSON CodeInterpreter Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps Methods toJSON :: CodeInterpreter -> Value # toEncoding :: CodeInterpreter -> Encoding # toJSONList :: [CodeInterpreter] -> Value # toEncodingList :: [CodeInterpreter] -> Encoding # omitField :: CodeInterpreter -> Bool # | |||||
| Generic CodeInterpreter Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps Associated Types
Methods from :: CodeInterpreter -> Rep CodeInterpreter x # to :: Rep CodeInterpreter x -> CodeInterpreter # | |||||
| Show CodeInterpreter Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps Methods showsPrec :: Int -> CodeInterpreter -> ShowS # show :: CodeInterpreter -> String # showList :: [CodeInterpreter] -> ShowS # | |||||
| type Rep CodeInterpreter Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps type Rep CodeInterpreter = D1 ('MetaData "CodeInterpreter" "OpenAI.V1.Threads.Runs.Steps" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "CodeInterpreter" 'PrefixI 'True) (S1 ('MetaSel ('Just "input") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "outputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector Output)))) | |||||
data RankingOptions Source #
The ranking options for the file search.
Constructors
| RankingOptions | |
Fields
| |
Instances
| FromJSON RankingOptions Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps Methods parseJSON :: Value -> Parser RankingOptions # parseJSONList :: Value -> Parser [RankingOptions] # | |||||
| ToJSON RankingOptions Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps Methods toJSON :: RankingOptions -> Value # toEncoding :: RankingOptions -> Encoding # toJSONList :: [RankingOptions] -> Value # toEncodingList :: [RankingOptions] -> Encoding # omitField :: RankingOptions -> Bool # | |||||
| Generic RankingOptions Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps Associated Types
Methods from :: RankingOptions -> Rep RankingOptions x # to :: Rep RankingOptions x -> RankingOptions # | |||||
| Show RankingOptions Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps Methods showsPrec :: Int -> RankingOptions -> ShowS # show :: RankingOptions -> String # showList :: [RankingOptions] -> ShowS # | |||||
| type Rep RankingOptions Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps type Rep RankingOptions = D1 ('MetaData "RankingOptions" "OpenAI.V1.Threads.Runs.Steps" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "RankingOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "ranker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "score_threshold") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double))) | |||||
The content of the result that was found
Instances
| FromJSON Content Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps | |||||
| ToJSON Content Source # | |||||
| Generic Content Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps Associated Types
| |||||
| Show Content Source # | |||||
| type Rep Content Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps type Rep Content = D1 ('MetaData "Content" "OpenAI.V1.Threads.Runs.Steps" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "Content" 'PrefixI 'True) (S1 ('MetaSel ('Just "type_") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) | |||||
Result of the file search
Constructors
| Result | |
Instances
| FromJSON Result Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps | |||||
| ToJSON Result Source # | |||||
| Generic Result Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps Associated Types
| |||||
| Show Result Source # | |||||
| type Rep Result Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps type Rep Result = D1 ('MetaData "Result" "OpenAI.V1.Threads.Runs.Steps" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "Result" 'PrefixI 'True) ((S1 ('MetaSel ('Just "file_id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FileID) :*: S1 ('MetaSel ('Just "file_name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "score") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector Content))))) | |||||
data FileSearch Source #
A File Search tool call
Constructors
| FileSearch | |
Fields
| |
Instances
| FromJSON FileSearch Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps | |||||
| ToJSON FileSearch Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps Methods toJSON :: FileSearch -> Value # toEncoding :: FileSearch -> Encoding # toJSONList :: [FileSearch] -> Value # toEncodingList :: [FileSearch] -> Encoding # omitField :: FileSearch -> Bool # | |||||
| Generic FileSearch Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps Associated Types
| |||||
| Show FileSearch Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps Methods showsPrec :: Int -> FileSearch -> ShowS # show :: FileSearch -> String # showList :: [FileSearch] -> ShowS # | |||||
| type Rep FileSearch Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps type Rep FileSearch = D1 ('MetaData "FileSearch" "OpenAI.V1.Threads.Runs.Steps" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "FileSearch" 'PrefixI 'True) (S1 ('MetaSel ('Just "ranking_options") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RankingOptions) :*: S1 ('MetaSel ('Just "results") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector Result)))) | |||||
The definition of the function that was called
Instances
| FromJSON Function Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps | |||||
| ToJSON Function Source # | |||||
| Generic Function Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps Associated Types
| |||||
| Show Function Source # | |||||
| type Rep Function Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps type Rep Function = D1 ('MetaData "Function" "OpenAI.V1.Threads.Runs.Steps" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "Function" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "arguments") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "output") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))))) | |||||
A tool call the run step was involved in
Constructors
| ToolCall_Code_Interpreter | |
Fields | |
| ToolCall_File_Search | |
Fields
| |
| ToolCall_Function | |
Instances
| FromJSON ToolCall Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps | |||||
| ToJSON ToolCall Source # | |||||
| Generic ToolCall Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps Associated Types
| |||||
| Show ToolCall Source # | |||||
| type Rep ToolCall Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps type Rep ToolCall = D1 ('MetaData "ToolCall" "OpenAI.V1.Threads.Runs.Steps" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "ToolCall_Code_Interpreter" 'PrefixI 'True) (S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "code_interpreter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CodeInterpreter)) :+: (C1 ('MetaCons "ToolCall_File_Search" 'PrefixI 'True) (S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "file_search") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text FileSearch))) :+: C1 ('MetaCons "ToolCall_Function" 'PrefixI 'True) (S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "function") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Function)))) | |||||
data StepDetails Source #
The details of the run step
Constructors
| Message_Creation | |
Fields | |
| Tool_Calls | |
Fields
| |
Instances
| FromJSON StepDetails Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps | |||||
| ToJSON StepDetails Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps Methods toJSON :: StepDetails -> Value # toEncoding :: StepDetails -> Encoding # toJSONList :: [StepDetails] -> Value # toEncodingList :: [StepDetails] -> Encoding # omitField :: StepDetails -> Bool # | |||||
| Generic StepDetails Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps Associated Types
| |||||
| Show StepDetails Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps Methods showsPrec :: Int -> StepDetails -> ShowS # show :: StepDetails -> String # showList :: [StepDetails] -> ShowS # | |||||
| type Rep StepDetails Source # | |||||
Defined in OpenAI.V1.Threads.Runs.Steps type Rep StepDetails = D1 ('MetaData "StepDetails" "OpenAI.V1.Threads.Runs.Steps" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "Message_Creation" 'PrefixI 'True) (S1 ('MetaSel ('Just "message_id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MessageID)) :+: C1 ('MetaCons "Tool_Calls" 'PrefixI 'True) (S1 ('MetaSel ('Just "tool_calls") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector ToolCall)))) | |||||
Servant
type API = "threads" :> (Header' '[Required, Strict] "OpenAI-Beta" Text :> ((Capture "thread_id" ThreadID :> ("runs" :> (Capture "run_id" RunID :> ("steps" :> (QueryParam "limit" Natural :> (QueryParam "order" Order :> (QueryParam "after" Text :> (QueryParam "before" Text :> (QueryParam "include[]" Text :> Get '[JSON] (ListOf RunStepObject)))))))))) :<|> (Capture "thread_id" ThreadID :> ("runs" :> (Capture "run_id" RunID :> ("steps" :> (Capture "step_id" StepID :> (QueryParam "include[]" Text :> Get '[JSON] RunStepObject)))))))) Source #
Servant API