Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
Instances
FromJSON User Source # | |
Defined in IntelliMonad.Types | |
ToJSON User Source # | |
Generic User Source # | |
Show User Source # | |
Eq User Source # | |
Ord User Source # | |
PersistField User Source # | |
Defined in IntelliMonad.Types toPersistValue :: User -> PersistValue # fromPersistValue :: PersistValue -> Either Text User # | |
PersistFieldSql User Source # | |
SymbolToField "user" Content User Source # | |
Defined in IntelliMonad.Types | |
type Rep User Source # | |
Defined in IntelliMonad.Types type Rep User = D1 ('MetaData "User" "IntelliMonad.Types" "intelli-monad-0.1.0.2-7aLMpsbCxFoFMlNn6ntog1" 'False) ((C1 ('MetaCons "User" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "System" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Assistant" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Tool" 'PrefixI 'False) (U1 :: Type -> Type))) |
userToText :: User -> Text Source #
textToUser :: Text -> User Source #
Instances
data FinishReason Source #
Instances
Show FinishReason Source # | |
Defined in IntelliMonad.Types showsPrec :: Int -> FinishReason -> ShowS # show :: FinishReason -> String # showList :: [FinishReason] -> ShowS # | |
Eq FinishReason Source # | |
Defined in IntelliMonad.Types (==) :: FinishReason -> FinishReason -> Bool # (/=) :: FinishReason -> FinishReason -> Bool # |
class ChatCompletion a where Source #
toRequest :: CreateChatCompletionRequest -> a -> CreateChatCompletionRequest Source #
fromResponse :: Text -> CreateChatCompletionResponse -> (a, FinishReason) Source #
Instances
class ChatCompletion a => Validate a b where Source #
tryConvert :: a -> Either a b Source #
toPV :: ToJSON a => a -> PersistValue Source #
Content | |
|
Instances
Context | |
|
Instances
KeyValue | |
|
Instances
type KeyValueId = Key KeyValue Source #
class CustomInstruction a where Source #
customHeader :: a -> Contents Source #
customFooter :: a -> Contents Source #
Instances
CustomInstruction Math Source # | |
Defined in IntelliMonad.CustomInstructions customHeader :: Math -> Contents Source # customFooter :: Math -> Contents Source # |
data CustomInstructionProxy Source #
forall t.CustomInstruction t => CustomInstructionProxy t |
data PersistProxy Source #
forall t.PersistentBackend t => PersistProxy t |
PromptEnv | |
|
type SessionName = Text Source #
toolFunctionName :: Text Source #
default toolFunctionName :: HasFunctionObject a => Text Source #
toolSchema :: ChatCompletionTool Source #
default toolSchema :: (HasFunctionObject a, JSONSchema a, Generic a, GSchema a (Rep a)) => ChatCompletionTool Source #
toolExec :: forall p m. (MonadIO m, MonadFail m, PersistentBackend p) => a -> Prompt m (Output a) Source #
Instances
toChatCompletionTool :: forall a. (HasFunctionObject a, JSONSchema a) => ChatCompletionTool Source #
class HasFunctionObject r where Source #
getFunctionName :: String Source #
getFunctionDescription :: String Source #
getFieldDescription :: String -> String Source #
Instances
HasFunctionObject ValidateNumber Source # | |
Defined in IntelliMonad.CustomInstructions | |
HasFunctionObject Arxiv Source # | |
Defined in IntelliMonad.Tools.Arxiv | |
HasFunctionObject Bash Source # | |
Defined in IntelliMonad.Tools.Bash | |
HasFunctionObject DallE3 Source # | |
Defined in IntelliMonad.Tools.DallE3 | |
HasFunctionObject DeleteKey Source # | |
Defined in IntelliMonad.Tools.KeyValue | |
HasFunctionObject GetKey Source # | |
Defined in IntelliMonad.Tools.KeyValue | |
HasFunctionObject ListKeys Source # | |
Defined in IntelliMonad.Tools.KeyValue | |
HasFunctionObject SetKey Source # | |
Defined in IntelliMonad.Tools.KeyValue | |
HasFunctionObject TextToSpeech Source # | |
Defined in IntelliMonad.Tools.TextToSpeech |
class JSONSchema r where Source #
Nothing
Instances
class GSchema s f where Source #
Instances
(HasFunctionObject s, JSONSchema c) => GSchema s (U1 :: Type -> Type) Source # | |
(HasFunctionObject s, GSchema s a, GSchema s b) => GSchema s (a :*: b) Source # | |
(HasFunctionObject s, GSchema s a, GSchema s b) => GSchema s (a :+: b) Source # | |
(HasFunctionObject s, JSONSchema c) => GSchema s (K1 i c :: Type -> Type) Source # | |
(HasFunctionObject s, GSchema s f, Constructor c) => GSchema s (M1 C c f) Source # | Constructor Metadata |
(HasFunctionObject s, GSchema s f) => GSchema s (M1 D c f) Source # | Datatype |
(HasFunctionObject s, GSchema s f, Selector c) => GSchema s (M1 S c f) Source # | Selector Metadata |
toolAdd :: forall a. Tool a => CreateChatCompletionRequest -> CreateChatCompletionRequest Source #
data ReplCommand Source #
Instances
Show ReplCommand Source # | |
Defined in IntelliMonad.Types showsPrec :: Int -> ReplCommand -> ShowS # show :: ReplCommand -> String # showList :: [ReplCommand] -> ShowS # | |
Eq ReplCommand Source # | |
Defined in IntelliMonad.Types (==) :: ReplCommand -> ReplCommand -> Bool # (/=) :: ReplCommand -> ReplCommand -> Bool # |
class PersistentBackend p where Source #
setup :: (MonadIO m, MonadFail m) => p -> m (Maybe (Conn p)) Source #
initialize :: (MonadIO m, MonadFail m) => Conn p -> Context -> m () Source #
load :: (MonadIO m, MonadFail m) => Conn p -> SessionName -> m (Maybe Context) Source #
loadByKey :: (MonadIO m, MonadFail m) => Conn p -> Key Context -> m (Maybe Context) Source #
save :: (MonadIO m, MonadFail m) => Conn p -> Context -> m (Maybe (Key Context)) Source #
saveContents :: (MonadIO m, MonadFail m) => Conn p -> [Content] -> m () Source #
listSessions :: (MonadIO m, MonadFail m) => Conn p -> m [Text] Source #
deleteSession :: (MonadIO m, MonadFail m) => Conn p -> SessionName -> m () Source #
listKeys :: (MonadIO m, MonadFail m) => Conn p -> m [Unique KeyValue] Source #
getKey :: (MonadIO m, MonadFail m) => Conn p -> Unique KeyValue -> m (Maybe Text) Source #
setKey :: (MonadIO m, MonadFail m) => Conn p -> Unique KeyValue -> Text -> m () Source #
deleteKey :: (MonadIO m, MonadFail m) => Conn p -> Unique KeyValue -> m () Source #