| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
OpenAI.V1.Tool
Description
The Tool type
Synopsis
- data Tool
- = Tool_Code_Interpreter { }
- | Tool_File_Search { }
- | Tool_Function { }
- | Tool_Web_Search
- data RankingOptions = RankingOptions {
- ranker :: Maybe Text
- score_threshold :: Double
- data FileSearch = FileSearch {}
- data Function = Function {}
- data ToolChoice
- data CodeInterpreterContainer
- toolChoiceNoneText :: Text
- toolChoiceAutoText :: Text
- toolChoiceRequiredText :: Text
- codeInterpreter :: Tool
- codeInterpreterAuto :: Tool
- codeInterpreterWithFiles :: [Text] -> Tool
- toolToResponsesValue :: Tool -> Value
- parseResponsesToolValue :: Value -> Parser Tool
- toolChoiceToResponsesValue :: ToolChoice -> Value
- parseResponsesToolChoiceValue :: Value -> Parser ToolChoice
- flattenToolValue :: Value -> Value
- unflattenToolValue :: Value -> Value
Types
A tool enabled on the assistant
Constructors
| Tool_Code_Interpreter | |
Fields | |
| Tool_File_Search | |
Fields | |
| Tool_Function | |
| Tool_Web_Search | |
Instances
data RankingOptions Source #
The ranking options for the file search
Constructors
| RankingOptions | |
Fields
| |
Instances
| FromJSON RankingOptions Source # | |||||
Defined in OpenAI.V1.Tool Methods parseJSON :: Value -> Parser RankingOptions # parseJSONList :: Value -> Parser [RankingOptions] # | |||||
| ToJSON RankingOptions Source # | |||||
Defined in OpenAI.V1.Tool Methods toJSON :: RankingOptions -> Value # toEncoding :: RankingOptions -> Encoding # toJSONList :: [RankingOptions] -> Value # toEncodingList :: [RankingOptions] -> Encoding # omitField :: RankingOptions -> Bool # | |||||
| Generic RankingOptions Source # | |||||
Defined in OpenAI.V1.Tool Associated Types
Methods from :: RankingOptions -> Rep RankingOptions x # to :: Rep RankingOptions x -> RankingOptions # | |||||
| Show RankingOptions Source # | |||||
Defined in OpenAI.V1.Tool Methods showsPrec :: Int -> RankingOptions -> ShowS # show :: RankingOptions -> String # showList :: [RankingOptions] -> ShowS # | |||||
| type Rep RankingOptions Source # | |||||
Defined in OpenAI.V1.Tool type Rep RankingOptions = D1 ('MetaData "RankingOptions" "OpenAI.V1.Tool" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "RankingOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "ranker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "score_threshold") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double))) | |||||
data FileSearch Source #
Overrides for the file search tool
Constructors
| FileSearch | |
Fields | |
Instances
| FromJSON FileSearch Source # | |||||
Defined in OpenAI.V1.Tool | |||||
| ToJSON FileSearch Source # | |||||
Defined in OpenAI.V1.Tool Methods toJSON :: FileSearch -> Value # toEncoding :: FileSearch -> Encoding # toJSONList :: [FileSearch] -> Value # toEncodingList :: [FileSearch] -> Encoding # omitField :: FileSearch -> Bool # | |||||
| Generic FileSearch Source # | |||||
Defined in OpenAI.V1.Tool Associated Types
| |||||
| Show FileSearch Source # | |||||
Defined in OpenAI.V1.Tool Methods showsPrec :: Int -> FileSearch -> ShowS # show :: FileSearch -> String # showList :: [FileSearch] -> ShowS # | |||||
| type Rep FileSearch Source # | |||||
Defined in OpenAI.V1.Tool type Rep FileSearch = D1 ('MetaData "FileSearch" "OpenAI.V1.Tool" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "FileSearch" 'PrefixI 'True) (S1 ('MetaSel ('Just "max_num_results") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "ranking_options") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe RankingOptions)))) | |||||
The Function tool
Constructors
| Function | |
Instances
| FromJSON Function Source # | |||||
Defined in OpenAI.V1.Tool | |||||
| ToJSON Function Source # | |||||
| Generic Function Source # | |||||
Defined in OpenAI.V1.Tool Associated Types
| |||||
| Show Function Source # | |||||
| type Rep Function Source # | |||||
Defined in OpenAI.V1.Tool type Rep Function = D1 ('MetaData "Function" "OpenAI.V1.Tool" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "Function" 'PrefixI 'True) ((S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "parameters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Value)) :*: S1 ('MetaSel ('Just "strict") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))))) | |||||
data ToolChoice Source #
Controls which (if any) tool is called by the model
Constructors
| ToolChoiceNone | |
| ToolChoiceAuto | |
| ToolChoiceRequired | |
| ToolChoiceTool Tool |
Instances
| FromJSON ToolChoice Source # | |||||
Defined in OpenAI.V1.Tool | |||||
| ToJSON ToolChoice Source # | |||||
Defined in OpenAI.V1.Tool Methods toJSON :: ToolChoice -> Value # toEncoding :: ToolChoice -> Encoding # toJSONList :: [ToolChoice] -> Value # toEncodingList :: [ToolChoice] -> Encoding # omitField :: ToolChoice -> Bool # | |||||
| Generic ToolChoice Source # | |||||
Defined in OpenAI.V1.Tool Associated Types
| |||||
| Show ToolChoice Source # | |||||
Defined in OpenAI.V1.Tool Methods showsPrec :: Int -> ToolChoice -> ShowS # show :: ToolChoice -> String # showList :: [ToolChoice] -> ShowS # | |||||
| type Rep ToolChoice Source # | |||||
Defined in OpenAI.V1.Tool type Rep ToolChoice = D1 ('MetaData "ToolChoice" "OpenAI.V1.Tool" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) ((C1 ('MetaCons "ToolChoiceNone" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ToolChoiceAuto" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ToolChoiceRequired" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ToolChoiceTool" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Tool)))) | |||||
data CodeInterpreterContainer Source #
Code Interpreter container reference
Constructors
| CodeInterpreterContainer_Auto | |
| CodeInterpreterContainer_ID | |
Fields
| |
Instances
| FromJSON CodeInterpreterContainer Source # | |||||
Defined in OpenAI.V1.Tool Methods parseJSON :: Value -> Parser CodeInterpreterContainer # parseJSONList :: Value -> Parser [CodeInterpreterContainer] # | |||||
| ToJSON CodeInterpreterContainer Source # | |||||
Defined in OpenAI.V1.Tool Methods toJSON :: CodeInterpreterContainer -> Value # toEncoding :: CodeInterpreterContainer -> Encoding # toJSONList :: [CodeInterpreterContainer] -> Value # | |||||
| Generic CodeInterpreterContainer Source # | |||||
Defined in OpenAI.V1.Tool Associated Types
Methods from :: CodeInterpreterContainer -> Rep CodeInterpreterContainer x # to :: Rep CodeInterpreterContainer x -> CodeInterpreterContainer # | |||||
| Show CodeInterpreterContainer Source # | |||||
Defined in OpenAI.V1.Tool Methods showsPrec :: Int -> CodeInterpreterContainer -> ShowS # show :: CodeInterpreterContainer -> String # showList :: [CodeInterpreterContainer] -> ShowS # | |||||
| type Rep CodeInterpreterContainer Source # | |||||
Defined in OpenAI.V1.Tool type Rep CodeInterpreterContainer = D1 ('MetaData "CodeInterpreterContainer" "OpenAI.V1.Tool" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "CodeInterpreterContainer_Auto" 'PrefixI 'True) (S1 ('MetaSel ('Just "file_ids") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Vector Text)))) :+: C1 ('MetaCons "CodeInterpreterContainer_ID" 'PrefixI 'True) (S1 ('MetaSel ('Just "container_id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) | |||||
Constants
toolChoiceNoneText :: Text Source #
Tool choice string constants
toolChoiceAutoText :: Text Source #
Tool choice string constants
toolChoiceRequiredText :: Text Source #
Tool choice string constants
Helpers
codeInterpreter :: Tool Source #
Convenience: Code Interpreter without an explicit container (for Assistants API)
codeInterpreterAuto :: Tool Source #
Convenience: Code Interpreter with automatic new container and no files
codeInterpreterWithFiles :: [Text] -> Tool Source #
Convenience: Code Interpreter with automatic new container seeded with files
toolToResponsesValue :: Tool -> Value Source #
flattenToolValue :: Value -> Value Source #
unflattenToolValue :: Value -> Value Source #