Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
setContext :: forall p m. (MonadIO m, MonadFail m, PersistentBackend p) => Context -> Prompt m () Source #
push :: forall p m. (MonadIO m, MonadFail m, PersistentBackend p) => Contents -> Prompt m () Source #
pushToolReturn :: forall p m. (MonadIO m, MonadFail m, PersistentBackend p) => Contents -> Prompt m () Source #
callPreHook :: forall p m. (MonadIO m, MonadFail m, PersistentBackend p) => Prompt m () Source #
callPostHook :: forall p m. (MonadIO m, MonadFail m, PersistentBackend p) => Prompt m () Source #
callWithText :: forall p m. (MonadIO m, MonadFail m, PersistentBackend p) => Text -> Prompt m Contents Source #
callWithContents :: forall p m. (MonadIO m, MonadFail m, PersistentBackend p) => Contents -> Prompt m Contents Source #
callWithValidation :: forall validation p m. (MonadIO m, MonadFail m, PersistentBackend p, Tool validation, FromJSON validation, FromJSON (Output validation), ToJSON validation, ToJSON (Output validation)) => Contents -> Prompt m (Maybe validation) Source #
runPromptWithValidation :: forall validation p m. (MonadIO m, MonadFail m, PersistentBackend p, Tool validation, FromJSON validation, FromJSON (Output validation), ToJSON validation, ToJSON (Output validation)) => [ToolProxy] -> [CustomInstructionProxy] -> Text -> CreateChatCompletionRequest -> Text -> m (Maybe validation) Source #
generate :: forall input output m p. (MonadIO m, MonadFail m, p ~ StatelessConf, ToJSON input, FromJSON input, JSONSchema input, Tool output, FromJSON output, FromJSON (Output output), ToJSON output, ToJSON (Output output)) => Contents -> input -> m (Maybe output) Source #
initializePrompt :: forall p m. (MonadIO m, MonadFail m, PersistentBackend p) => [ToolProxy] -> [CustomInstructionProxy] -> Text -> CreateChatCompletionRequest -> m PromptEnv Source #
runPrompt :: forall p m a. (MonadIO m, MonadFail m, PersistentBackend p) => [ToolProxy] -> [CustomInstructionProxy] -> Text -> CreateChatCompletionRequest -> Prompt m a -> m a Source #
runRequest :: ChatCompletion a => Text -> CreateChatCompletionRequest -> a -> IO ((a, FinishReason), CreateChatCompletionResponse) Source #
showContents :: MonadIO m => Contents -> m () Source #
callWithImage :: forall p m. (MonadIO m, MonadFail m, PersistentBackend p) => Text -> Prompt m Contents Source #