Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
IntelliMonad.Types
Contents
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 Methods toPersistValue :: User -> PersistValue # fromPersistValue :: PersistValue -> Either Text User # | |
PersistFieldSql User Source # | |
SymbolToField "user" Content User Source # | |
Defined in IntelliMonad.Types Methods | |
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 #
Constructors
Message | |
Image | |
ToolCall | |
ToolReturn | |
Instances
data FinishReason Source #
Constructors
Stop | |
Length | |
ToolCalls | |
FunctionCall | |
ContentFilter | |
Null |
Instances
Show FinishReason Source # | |
Defined in IntelliMonad.Types Methods showsPrec :: Int -> FinishReason -> ShowS # show :: FinishReason -> String # showList :: [FinishReason] -> ShowS # | |
Eq FinishReason Source # | |
Defined in IntelliMonad.Types |
class ChatCompletion a where Source #
Methods
toRequest :: CreateChatCompletionRequest -> a -> CreateChatCompletionRequest Source #
fromResponse :: Text -> CreateChatCompletionResponse -> (a, FinishReason) Source #
Instances
ChatCompletion Contents Source # | |
Defined in IntelliMonad.Prompt Methods toRequest :: CreateChatCompletionRequest -> Contents -> CreateChatCompletionRequest Source # fromResponse :: Text -> CreateChatCompletionResponse -> (Contents, FinishReason) Source # |
class ChatCompletion a => Validate a b where Source #
Methods
tryConvert :: a -> Either a b Source #
toPV :: ToJSON a => a -> PersistValue Source #
Constructors
Content | |
Fields
|
Instances
Constructors
Context | |
Fields
|
Instances
Constructors
KeyValue | |
Fields
|
Instances
type KeyValueId = Key KeyValue Source #
class CustomInstruction a where Source #
Instances
CustomInstruction Math Source # | |
Defined in IntelliMonad.CustomInstructions |
data CustomInstructionProxy Source #
Constructors
forall t.CustomInstruction t => CustomInstructionProxy t |
data PersistProxy Source #
Constructors
forall t.PersistentBackend t => PersistProxy t |
Constructors
PromptEnv | |
Fields
|
type SessionName = Text Source #
Minimal complete definition
Methods
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 #
Methods
getFunctionName :: String Source #
getFunctionDescription :: String Source #
getFieldDescription :: String -> String Source #
Instances
class JSONSchema r where Source #
Minimal complete definition
Nothing
Methods
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 #
Constructors
Instances
Show ReplCommand Source # | |
Defined in IntelliMonad.Types Methods showsPrec :: Int -> ReplCommand -> ShowS # show :: ReplCommand -> String # showList :: [ReplCommand] -> ShowS # | |
Eq ReplCommand Source # | |
Defined in IntelliMonad.Types |
class PersistentBackend p where Source #
Methods
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 #