| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
OpenAI.V1.Assistants
Contents
Description
/v1/assistants
Synopsis
- newtype AssistantID = AssistantID {}
- data CreateAssistant = CreateAssistant {
- model :: Model
- name :: Maybe Text
- description :: Maybe Text
- instructions :: Maybe Text
- tools :: Maybe (Vector Tool)
- tool_resources :: Maybe ToolResources
- metadata :: Maybe (Map Text Text)
- temperature :: Maybe Double
- top_p :: Maybe Double
- response_format :: Maybe (AutoOr ResponseFormat)
- _CreateAssistant :: CreateAssistant
- data ModifyAssistant = ModifyAssistant {
- model :: Model
- name :: Maybe Text
- description :: Maybe Text
- instructions :: Maybe Text
- tools :: Maybe (Vector Tool)
- tool_resources :: Maybe ToolResources
- metadata :: Maybe (Map Text Text)
- temperature :: Maybe Double
- top_p :: Maybe Double
- response_format :: Maybe (AutoOr ResponseFormat)
- _ModifyAssistant :: ModifyAssistant
- data AssistantObject = AssistantObject {
- id :: AssistantID
- object :: Text
- created_at :: POSIXTime
- name :: Maybe Text
- description :: Maybe Text
- model :: Model
- instructions :: Maybe Text
- tools :: Maybe (Vector Tool)
- tool_resources :: Maybe ToolResources
- metadata :: Map Text Text
- temperature :: Maybe Double
- top_p :: Maybe Double
- response_format :: AutoOr ResponseFormat
- data RankingOptions
- data FileSearch = FileSearch {}
- data Function = Function {}
- data Tool
- = Tool_Code_Interpreter { }
- | Tool_File_Search { }
- | Tool_Function { }
- | Tool_Web_Search
- data CodeInterpreterResources = CodeInterpreterResources {}
- data FileSearchResources = FileSearchResources {
- vector_store_ids :: Maybe (Vector FileID)
- vector_stores :: Maybe (Vector VectorStore)
- data ToolResources = ToolResources {}
- type API = Header' '[Required, Strict] "OpenAI-Beta" Text :> ("assistants" :> ((ReqBody '[JSON] CreateAssistant :> Post '[JSON] AssistantObject) :<|> ((QueryParam "limit" Natural :> (QueryParam "order" Order :> (QueryParam "after" Text :> (QueryParam "before" Text :> Get '[JSON] (ListOf AssistantObject))))) :<|> ((Capture "assistant_id" AssistantID :> Get '[JSON] AssistantObject) :<|> ((Capture "assistant_id" AssistantID :> (ReqBody '[JSON] ModifyAssistant :> Post '[JSON] AssistantObject)) :<|> (Capture "assistant_id" AssistantID :> Delete '[JSON] DeletionStatus))))))
Main types
newtype AssistantID Source #
AssistantID
Constructors
| AssistantID | |
Instances
| FromJSON AssistantID Source # | |
Defined in OpenAI.V1.Assistants | |
| ToJSON AssistantID Source # | |
Defined in OpenAI.V1.Assistants Methods toJSON :: AssistantID -> Value # toEncoding :: AssistantID -> Encoding # toJSONList :: [AssistantID] -> Value # toEncodingList :: [AssistantID] -> Encoding # omitField :: AssistantID -> Bool # | |
| IsString AssistantID Source # | |
Defined in OpenAI.V1.Assistants Methods fromString :: String -> AssistantID # | |
| Show AssistantID Source # | |
Defined in OpenAI.V1.Assistants Methods showsPrec :: Int -> AssistantID -> ShowS # show :: AssistantID -> String # showList :: [AssistantID] -> ShowS # | |
| ToHttpApiData AssistantID Source # | |
Defined in OpenAI.V1.Assistants Methods toUrlPiece :: AssistantID -> Text # toEncodedUrlPiece :: AssistantID -> Builder # toHeader :: AssistantID -> ByteString # toQueryParam :: AssistantID -> Text # | |
data CreateAssistant Source #
Request body for /v1/assistants
Constructors
| CreateAssistant | |
Fields
| |
Instances
_CreateAssistant :: CreateAssistant Source #
Default CreateAssistant
data ModifyAssistant Source #
Request body for /v1/assistants/:assistant_id
Constructors
| ModifyAssistant | |
Fields
| |
Instances
| FromJSON ModifyAssistant Source # | |||||
Defined in OpenAI.V1.Assistants Methods parseJSON :: Value -> Parser ModifyAssistant # parseJSONList :: Value -> Parser [ModifyAssistant] # | |||||
| ToJSON ModifyAssistant Source # | |||||
Defined in OpenAI.V1.Assistants Methods toJSON :: ModifyAssistant -> Value # toEncoding :: ModifyAssistant -> Encoding # toJSONList :: [ModifyAssistant] -> Value # toEncodingList :: [ModifyAssistant] -> Encoding # omitField :: ModifyAssistant -> Bool # | |||||
| Generic ModifyAssistant Source # | |||||
Defined in OpenAI.V1.Assistants Associated Types
Methods from :: ModifyAssistant -> Rep ModifyAssistant x # to :: Rep ModifyAssistant x -> ModifyAssistant # | |||||
| Show ModifyAssistant Source # | |||||
Defined in OpenAI.V1.Assistants Methods showsPrec :: Int -> ModifyAssistant -> ShowS # show :: ModifyAssistant -> String # showList :: [ModifyAssistant] -> ShowS # | |||||
| type Rep ModifyAssistant Source # | |||||
Defined in OpenAI.V1.Assistants type Rep ModifyAssistant = D1 ('MetaData "ModifyAssistant" "OpenAI.V1.Assistants" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "ModifyAssistant" 'PrefixI 'True) (((S1 ('MetaSel ('Just "model") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Model) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "instructions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "tools") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Vector Tool)))))) :*: ((S1 ('MetaSel ('Just "tool_resources") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ToolResources)) :*: S1 ('MetaSel ('Just "metadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Map Text Text)))) :*: (S1 ('MetaSel ('Just "temperature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Double)) :*: (S1 ('MetaSel ('Just "top_p") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Double)) :*: S1 ('MetaSel ('Just "response_format") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (AutoOr ResponseFormat)))))))) | |||||
_ModifyAssistant :: ModifyAssistant Source #
Default ModifyAssistant
data AssistantObject Source #
Represents an assistant that can call the model and use tools.
Constructors
| AssistantObject | |
Fields
| |
Instances
| FromJSON AssistantObject Source # | |||||
Defined in OpenAI.V1.Assistants Methods parseJSON :: Value -> Parser AssistantObject # parseJSONList :: Value -> Parser [AssistantObject] # | |||||
| ToJSON AssistantObject Source # | |||||
Defined in OpenAI.V1.Assistants Methods toJSON :: AssistantObject -> Value # toEncoding :: AssistantObject -> Encoding # toJSONList :: [AssistantObject] -> Value # toEncodingList :: [AssistantObject] -> Encoding # omitField :: AssistantObject -> Bool # | |||||
| Generic AssistantObject Source # | |||||
Defined in OpenAI.V1.Assistants Associated Types
Methods from :: AssistantObject -> Rep AssistantObject x # to :: Rep AssistantObject x -> AssistantObject # | |||||
| Show AssistantObject Source # | |||||
Defined in OpenAI.V1.Assistants Methods showsPrec :: Int -> AssistantObject -> ShowS # show :: AssistantObject -> String # showList :: [AssistantObject] -> ShowS # | |||||
| type Rep AssistantObject Source # | |||||
Defined in OpenAI.V1.Assistants type Rep AssistantObject = D1 ('MetaData "AssistantObject" "OpenAI.V1.Assistants" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "AssistantObject" 'PrefixI 'True) (((S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AssistantID) :*: (S1 ('MetaSel ('Just "object") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "created_at") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 POSIXTime))) :*: (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "model") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Model)))) :*: ((S1 ('MetaSel ('Just "instructions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "tools") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Vector Tool))) :*: S1 ('MetaSel ('Just "tool_resources") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ToolResources)))) :*: ((S1 ('MetaSel ('Just "metadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Text)) :*: S1 ('MetaSel ('Just "temperature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Double))) :*: (S1 ('MetaSel ('Just "top_p") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Double)) :*: S1 ('MetaSel ('Just "response_format") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (AutoOr ResponseFormat))))))) | |||||
Other types
data RankingOptions Source #
The ranking options for the file search
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))))) | |||||
A tool enabled on the assistant
Constructors
| Tool_Code_Interpreter | |
Fields | |
| Tool_File_Search | |
Fields | |
| Tool_Function | |
| Tool_Web_Search | |
Instances
| FromJSON Tool Source # | |||||
Defined in OpenAI.V1.Tool | |||||
| ToJSON Tool Source # | |||||
| Generic Tool Source # | |||||
Defined in OpenAI.V1.Tool Associated Types
| |||||
| Show Tool Source # | |||||
| type Rep Tool Source # | |||||
Defined in OpenAI.V1.Tool type Rep Tool = D1 ('MetaData "Tool" "OpenAI.V1.Tool" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) ((C1 ('MetaCons "Tool_Code_Interpreter" 'PrefixI 'True) (S1 ('MetaSel ('Just "container") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CodeInterpreterContainer))) :+: C1 ('MetaCons "Tool_File_Search" 'PrefixI 'True) (S1 ('MetaSel ('Just "file_search") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FileSearch))) :+: (C1 ('MetaCons "Tool_Function" 'PrefixI 'True) (S1 ('MetaSel ('Just "function") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Function)) :+: C1 ('MetaCons "Tool_Web_Search" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
data CodeInterpreterResources Source #
Resources for the code search tool
Constructors
| CodeInterpreterResources | |
Instances
| FromJSON CodeInterpreterResources Source # | |||||
Defined in OpenAI.V1.ToolResources Methods parseJSON :: Value -> Parser CodeInterpreterResources # parseJSONList :: Value -> Parser [CodeInterpreterResources] # | |||||
| ToJSON CodeInterpreterResources Source # | |||||
Defined in OpenAI.V1.ToolResources Methods toJSON :: CodeInterpreterResources -> Value # toEncoding :: CodeInterpreterResources -> Encoding # toJSONList :: [CodeInterpreterResources] -> Value # | |||||
| Generic CodeInterpreterResources Source # | |||||
Defined in OpenAI.V1.ToolResources Associated Types
Methods from :: CodeInterpreterResources -> Rep CodeInterpreterResources x # to :: Rep CodeInterpreterResources x -> CodeInterpreterResources # | |||||
| Show CodeInterpreterResources Source # | |||||
Defined in OpenAI.V1.ToolResources Methods showsPrec :: Int -> CodeInterpreterResources -> ShowS # show :: CodeInterpreterResources -> String # showList :: [CodeInterpreterResources] -> ShowS # | |||||
| type Rep CodeInterpreterResources Source # | |||||
Defined in OpenAI.V1.ToolResources type Rep CodeInterpreterResources = D1 ('MetaData "CodeInterpreterResources" "OpenAI.V1.ToolResources" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "CodeInterpreterResources" 'PrefixI 'True) (S1 ('MetaSel ('Just "file_ids") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Vector FileID))))) | |||||
data FileSearchResources Source #
Resources for the file search tool
Constructors
| FileSearchResources | |
Fields
| |
Instances
| FromJSON FileSearchResources Source # | |||||
Defined in OpenAI.V1.ToolResources Methods parseJSON :: Value -> Parser FileSearchResources # parseJSONList :: Value -> Parser [FileSearchResources] # | |||||
| ToJSON FileSearchResources Source # | |||||
Defined in OpenAI.V1.ToolResources Methods toJSON :: FileSearchResources -> Value # toEncoding :: FileSearchResources -> Encoding # toJSONList :: [FileSearchResources] -> Value # toEncodingList :: [FileSearchResources] -> Encoding # omitField :: FileSearchResources -> Bool # | |||||
| Generic FileSearchResources Source # | |||||
Defined in OpenAI.V1.ToolResources Associated Types
Methods from :: FileSearchResources -> Rep FileSearchResources x # to :: Rep FileSearchResources x -> FileSearchResources # | |||||
| Show FileSearchResources Source # | |||||
Defined in OpenAI.V1.ToolResources Methods showsPrec :: Int -> FileSearchResources -> ShowS # show :: FileSearchResources -> String # showList :: [FileSearchResources] -> ShowS # | |||||
| type Rep FileSearchResources Source # | |||||
Defined in OpenAI.V1.ToolResources type Rep FileSearchResources = D1 ('MetaData "FileSearchResources" "OpenAI.V1.ToolResources" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "FileSearchResources" 'PrefixI 'True) (S1 ('MetaSel ('Just "vector_store_ids") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Vector FileID))) :*: S1 ('MetaSel ('Just "vector_stores") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Vector VectorStore))))) | |||||
data ToolResources Source #
A set of resources that are used by the assistant's tools
Constructors
| ToolResources | |
Instances
| FromJSON ToolResources Source # | |||||
Defined in OpenAI.V1.ToolResources Methods parseJSON :: Value -> Parser ToolResources # parseJSONList :: Value -> Parser [ToolResources] # | |||||
| ToJSON ToolResources Source # | |||||
Defined in OpenAI.V1.ToolResources Methods toJSON :: ToolResources -> Value # toEncoding :: ToolResources -> Encoding # toJSONList :: [ToolResources] -> Value # toEncodingList :: [ToolResources] -> Encoding # omitField :: ToolResources -> Bool # | |||||
| Generic ToolResources Source # | |||||
Defined in OpenAI.V1.ToolResources Associated Types
| |||||
| Show ToolResources Source # | |||||
Defined in OpenAI.V1.ToolResources Methods showsPrec :: Int -> ToolResources -> ShowS # show :: ToolResources -> String # showList :: [ToolResources] -> ShowS # | |||||
| type Rep ToolResources Source # | |||||
Defined in OpenAI.V1.ToolResources type Rep ToolResources = D1 ('MetaData "ToolResources" "OpenAI.V1.ToolResources" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "ToolResources" 'PrefixI 'True) (S1 ('MetaSel ('Just "code_interpreter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CodeInterpreterResources)) :*: S1 ('MetaSel ('Just "file_search") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FileSearchResources)))) | |||||
Servant
type API = Header' '[Required, Strict] "OpenAI-Beta" Text :> ("assistants" :> ((ReqBody '[JSON] CreateAssistant :> Post '[JSON] AssistantObject) :<|> ((QueryParam "limit" Natural :> (QueryParam "order" Order :> (QueryParam "after" Text :> (QueryParam "before" Text :> Get '[JSON] (ListOf AssistantObject))))) :<|> ((Capture "assistant_id" AssistantID :> Get '[JSON] AssistantObject) :<|> ((Capture "assistant_id" AssistantID :> (ReqBody '[JSON] ModifyAssistant :> Post '[JSON] AssistantObject)) :<|> (Capture "assistant_id" AssistantID :> Delete '[JSON] DeletionStatus)))))) Source #
Servant API