module Stratosphere.Bedrock.PromptVersion.ChatPromptTemplateConfigurationProperty (
module Exports, ChatPromptTemplateConfigurationProperty(..),
mkChatPromptTemplateConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Bedrock.PromptVersion.MessageProperty as Exports
import {-# SOURCE #-} Stratosphere.Bedrock.PromptVersion.PromptInputVariableProperty as Exports
import {-# SOURCE #-} Stratosphere.Bedrock.PromptVersion.SystemContentBlockProperty as Exports
import {-# SOURCE #-} Stratosphere.Bedrock.PromptVersion.ToolConfigurationProperty as Exports
import Stratosphere.ResourceProperties
data ChatPromptTemplateConfigurationProperty
=
ChatPromptTemplateConfigurationProperty {ChatPromptTemplateConfigurationProperty -> ()
haddock_workaround_ :: (),
ChatPromptTemplateConfigurationProperty
-> Maybe [PromptInputVariableProperty]
inputVariables :: (Prelude.Maybe [PromptInputVariableProperty]),
ChatPromptTemplateConfigurationProperty -> [MessageProperty]
messages :: [MessageProperty],
ChatPromptTemplateConfigurationProperty
-> Maybe [SystemContentBlockProperty]
system :: (Prelude.Maybe [SystemContentBlockProperty]),
ChatPromptTemplateConfigurationProperty
-> Maybe ToolConfigurationProperty
toolConfiguration :: (Prelude.Maybe ToolConfigurationProperty)}
deriving stock (ChatPromptTemplateConfigurationProperty
-> ChatPromptTemplateConfigurationProperty -> Bool
(ChatPromptTemplateConfigurationProperty
-> ChatPromptTemplateConfigurationProperty -> Bool)
-> (ChatPromptTemplateConfigurationProperty
-> ChatPromptTemplateConfigurationProperty -> Bool)
-> Eq ChatPromptTemplateConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ChatPromptTemplateConfigurationProperty
-> ChatPromptTemplateConfigurationProperty -> Bool
== :: ChatPromptTemplateConfigurationProperty
-> ChatPromptTemplateConfigurationProperty -> Bool
$c/= :: ChatPromptTemplateConfigurationProperty
-> ChatPromptTemplateConfigurationProperty -> Bool
/= :: ChatPromptTemplateConfigurationProperty
-> ChatPromptTemplateConfigurationProperty -> Bool
Prelude.Eq, Int -> ChatPromptTemplateConfigurationProperty -> ShowS
[ChatPromptTemplateConfigurationProperty] -> ShowS
ChatPromptTemplateConfigurationProperty -> String
(Int -> ChatPromptTemplateConfigurationProperty -> ShowS)
-> (ChatPromptTemplateConfigurationProperty -> String)
-> ([ChatPromptTemplateConfigurationProperty] -> ShowS)
-> Show ChatPromptTemplateConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ChatPromptTemplateConfigurationProperty -> ShowS
showsPrec :: Int -> ChatPromptTemplateConfigurationProperty -> ShowS
$cshow :: ChatPromptTemplateConfigurationProperty -> String
show :: ChatPromptTemplateConfigurationProperty -> String
$cshowList :: [ChatPromptTemplateConfigurationProperty] -> ShowS
showList :: [ChatPromptTemplateConfigurationProperty] -> ShowS
Prelude.Show)
mkChatPromptTemplateConfigurationProperty ::
[MessageProperty] -> ChatPromptTemplateConfigurationProperty
mkChatPromptTemplateConfigurationProperty :: [MessageProperty] -> ChatPromptTemplateConfigurationProperty
mkChatPromptTemplateConfigurationProperty [MessageProperty]
messages
= ChatPromptTemplateConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), messages :: [MessageProperty]
messages = [MessageProperty]
messages,
inputVariables :: Maybe [PromptInputVariableProperty]
inputVariables = Maybe [PromptInputVariableProperty]
forall a. Maybe a
Prelude.Nothing, system :: Maybe [SystemContentBlockProperty]
system = Maybe [SystemContentBlockProperty]
forall a. Maybe a
Prelude.Nothing,
toolConfiguration :: Maybe ToolConfigurationProperty
toolConfiguration = Maybe ToolConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ChatPromptTemplateConfigurationProperty where
toResourceProperties :: ChatPromptTemplateConfigurationProperty -> ResourceProperties
toResourceProperties ChatPromptTemplateConfigurationProperty {[MessageProperty]
Maybe [PromptInputVariableProperty]
Maybe [SystemContentBlockProperty]
Maybe ToolConfigurationProperty
()
haddock_workaround_ :: ChatPromptTemplateConfigurationProperty -> ()
inputVariables :: ChatPromptTemplateConfigurationProperty
-> Maybe [PromptInputVariableProperty]
messages :: ChatPromptTemplateConfigurationProperty -> [MessageProperty]
system :: ChatPromptTemplateConfigurationProperty
-> Maybe [SystemContentBlockProperty]
toolConfiguration :: ChatPromptTemplateConfigurationProperty
-> Maybe ToolConfigurationProperty
haddock_workaround_ :: ()
inputVariables :: Maybe [PromptInputVariableProperty]
messages :: [MessageProperty]
system :: Maybe [SystemContentBlockProperty]
toolConfiguration :: Maybe ToolConfigurationProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Bedrock::PromptVersion.ChatPromptTemplateConfiguration",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Messages" Key -> [MessageProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [MessageProperty]
messages]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [PromptInputVariableProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InputVariables" ([PromptInputVariableProperty] -> (Key, Value))
-> Maybe [PromptInputVariableProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PromptInputVariableProperty]
inputVariables,
Key -> [SystemContentBlockProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"System" ([SystemContentBlockProperty] -> (Key, Value))
-> Maybe [SystemContentBlockProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SystemContentBlockProperty]
system,
Key -> ToolConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ToolConfiguration" (ToolConfigurationProperty -> (Key, Value))
-> Maybe ToolConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ToolConfigurationProperty
toolConfiguration]))}
instance JSON.ToJSON ChatPromptTemplateConfigurationProperty where
toJSON :: ChatPromptTemplateConfigurationProperty -> Value
toJSON ChatPromptTemplateConfigurationProperty {[MessageProperty]
Maybe [PromptInputVariableProperty]
Maybe [SystemContentBlockProperty]
Maybe ToolConfigurationProperty
()
haddock_workaround_ :: ChatPromptTemplateConfigurationProperty -> ()
inputVariables :: ChatPromptTemplateConfigurationProperty
-> Maybe [PromptInputVariableProperty]
messages :: ChatPromptTemplateConfigurationProperty -> [MessageProperty]
system :: ChatPromptTemplateConfigurationProperty
-> Maybe [SystemContentBlockProperty]
toolConfiguration :: ChatPromptTemplateConfigurationProperty
-> Maybe ToolConfigurationProperty
haddock_workaround_ :: ()
inputVariables :: Maybe [PromptInputVariableProperty]
messages :: [MessageProperty]
system :: Maybe [SystemContentBlockProperty]
toolConfiguration :: Maybe ToolConfigurationProperty
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Messages" Key -> [MessageProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [MessageProperty]
messages]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [PromptInputVariableProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InputVariables" ([PromptInputVariableProperty] -> (Key, Value))
-> Maybe [PromptInputVariableProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PromptInputVariableProperty]
inputVariables,
Key -> [SystemContentBlockProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"System" ([SystemContentBlockProperty] -> (Key, Value))
-> Maybe [SystemContentBlockProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SystemContentBlockProperty]
system,
Key -> ToolConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ToolConfiguration" (ToolConfigurationProperty -> (Key, Value))
-> Maybe ToolConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ToolConfigurationProperty
toolConfiguration])))
instance Property "InputVariables" ChatPromptTemplateConfigurationProperty where
type PropertyType "InputVariables" ChatPromptTemplateConfigurationProperty = [PromptInputVariableProperty]
set :: PropertyType
"InputVariables" ChatPromptTemplateConfigurationProperty
-> ChatPromptTemplateConfigurationProperty
-> ChatPromptTemplateConfigurationProperty
set PropertyType
"InputVariables" ChatPromptTemplateConfigurationProperty
newValue ChatPromptTemplateConfigurationProperty {[MessageProperty]
Maybe [PromptInputVariableProperty]
Maybe [SystemContentBlockProperty]
Maybe ToolConfigurationProperty
()
haddock_workaround_ :: ChatPromptTemplateConfigurationProperty -> ()
inputVariables :: ChatPromptTemplateConfigurationProperty
-> Maybe [PromptInputVariableProperty]
messages :: ChatPromptTemplateConfigurationProperty -> [MessageProperty]
system :: ChatPromptTemplateConfigurationProperty
-> Maybe [SystemContentBlockProperty]
toolConfiguration :: ChatPromptTemplateConfigurationProperty
-> Maybe ToolConfigurationProperty
haddock_workaround_ :: ()
inputVariables :: Maybe [PromptInputVariableProperty]
messages :: [MessageProperty]
system :: Maybe [SystemContentBlockProperty]
toolConfiguration :: Maybe ToolConfigurationProperty
..}
= ChatPromptTemplateConfigurationProperty
{inputVariables :: Maybe [PromptInputVariableProperty]
inputVariables = [PromptInputVariableProperty]
-> Maybe [PromptInputVariableProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [PromptInputVariableProperty]
PropertyType
"InputVariables" ChatPromptTemplateConfigurationProperty
newValue, [MessageProperty]
Maybe [SystemContentBlockProperty]
Maybe ToolConfigurationProperty
()
haddock_workaround_ :: ()
messages :: [MessageProperty]
system :: Maybe [SystemContentBlockProperty]
toolConfiguration :: Maybe ToolConfigurationProperty
haddock_workaround_ :: ()
messages :: [MessageProperty]
system :: Maybe [SystemContentBlockProperty]
toolConfiguration :: Maybe ToolConfigurationProperty
..}
instance Property "Messages" ChatPromptTemplateConfigurationProperty where
type PropertyType "Messages" ChatPromptTemplateConfigurationProperty = [MessageProperty]
set :: PropertyType "Messages" ChatPromptTemplateConfigurationProperty
-> ChatPromptTemplateConfigurationProperty
-> ChatPromptTemplateConfigurationProperty
set PropertyType "Messages" ChatPromptTemplateConfigurationProperty
newValue ChatPromptTemplateConfigurationProperty {[MessageProperty]
Maybe [PromptInputVariableProperty]
Maybe [SystemContentBlockProperty]
Maybe ToolConfigurationProperty
()
haddock_workaround_ :: ChatPromptTemplateConfigurationProperty -> ()
inputVariables :: ChatPromptTemplateConfigurationProperty
-> Maybe [PromptInputVariableProperty]
messages :: ChatPromptTemplateConfigurationProperty -> [MessageProperty]
system :: ChatPromptTemplateConfigurationProperty
-> Maybe [SystemContentBlockProperty]
toolConfiguration :: ChatPromptTemplateConfigurationProperty
-> Maybe ToolConfigurationProperty
haddock_workaround_ :: ()
inputVariables :: Maybe [PromptInputVariableProperty]
messages :: [MessageProperty]
system :: Maybe [SystemContentBlockProperty]
toolConfiguration :: Maybe ToolConfigurationProperty
..}
= ChatPromptTemplateConfigurationProperty {messages :: [MessageProperty]
messages = [MessageProperty]
PropertyType "Messages" ChatPromptTemplateConfigurationProperty
newValue, Maybe [PromptInputVariableProperty]
Maybe [SystemContentBlockProperty]
Maybe ToolConfigurationProperty
()
haddock_workaround_ :: ()
inputVariables :: Maybe [PromptInputVariableProperty]
system :: Maybe [SystemContentBlockProperty]
toolConfiguration :: Maybe ToolConfigurationProperty
haddock_workaround_ :: ()
inputVariables :: Maybe [PromptInputVariableProperty]
system :: Maybe [SystemContentBlockProperty]
toolConfiguration :: Maybe ToolConfigurationProperty
..}
instance Property "System" ChatPromptTemplateConfigurationProperty where
type PropertyType "System" ChatPromptTemplateConfigurationProperty = [SystemContentBlockProperty]
set :: PropertyType "System" ChatPromptTemplateConfigurationProperty
-> ChatPromptTemplateConfigurationProperty
-> ChatPromptTemplateConfigurationProperty
set PropertyType "System" ChatPromptTemplateConfigurationProperty
newValue ChatPromptTemplateConfigurationProperty {[MessageProperty]
Maybe [PromptInputVariableProperty]
Maybe [SystemContentBlockProperty]
Maybe ToolConfigurationProperty
()
haddock_workaround_ :: ChatPromptTemplateConfigurationProperty -> ()
inputVariables :: ChatPromptTemplateConfigurationProperty
-> Maybe [PromptInputVariableProperty]
messages :: ChatPromptTemplateConfigurationProperty -> [MessageProperty]
system :: ChatPromptTemplateConfigurationProperty
-> Maybe [SystemContentBlockProperty]
toolConfiguration :: ChatPromptTemplateConfigurationProperty
-> Maybe ToolConfigurationProperty
haddock_workaround_ :: ()
inputVariables :: Maybe [PromptInputVariableProperty]
messages :: [MessageProperty]
system :: Maybe [SystemContentBlockProperty]
toolConfiguration :: Maybe ToolConfigurationProperty
..}
= ChatPromptTemplateConfigurationProperty
{system :: Maybe [SystemContentBlockProperty]
system = [SystemContentBlockProperty] -> Maybe [SystemContentBlockProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [SystemContentBlockProperty]
PropertyType "System" ChatPromptTemplateConfigurationProperty
newValue, [MessageProperty]
Maybe [PromptInputVariableProperty]
Maybe ToolConfigurationProperty
()
haddock_workaround_ :: ()
inputVariables :: Maybe [PromptInputVariableProperty]
messages :: [MessageProperty]
toolConfiguration :: Maybe ToolConfigurationProperty
haddock_workaround_ :: ()
inputVariables :: Maybe [PromptInputVariableProperty]
messages :: [MessageProperty]
toolConfiguration :: Maybe ToolConfigurationProperty
..}
instance Property "ToolConfiguration" ChatPromptTemplateConfigurationProperty where
type PropertyType "ToolConfiguration" ChatPromptTemplateConfigurationProperty = ToolConfigurationProperty
set :: PropertyType
"ToolConfiguration" ChatPromptTemplateConfigurationProperty
-> ChatPromptTemplateConfigurationProperty
-> ChatPromptTemplateConfigurationProperty
set PropertyType
"ToolConfiguration" ChatPromptTemplateConfigurationProperty
newValue ChatPromptTemplateConfigurationProperty {[MessageProperty]
Maybe [PromptInputVariableProperty]
Maybe [SystemContentBlockProperty]
Maybe ToolConfigurationProperty
()
haddock_workaround_ :: ChatPromptTemplateConfigurationProperty -> ()
inputVariables :: ChatPromptTemplateConfigurationProperty
-> Maybe [PromptInputVariableProperty]
messages :: ChatPromptTemplateConfigurationProperty -> [MessageProperty]
system :: ChatPromptTemplateConfigurationProperty
-> Maybe [SystemContentBlockProperty]
toolConfiguration :: ChatPromptTemplateConfigurationProperty
-> Maybe ToolConfigurationProperty
haddock_workaround_ :: ()
inputVariables :: Maybe [PromptInputVariableProperty]
messages :: [MessageProperty]
system :: Maybe [SystemContentBlockProperty]
toolConfiguration :: Maybe ToolConfigurationProperty
..}
= ChatPromptTemplateConfigurationProperty
{toolConfiguration :: Maybe ToolConfigurationProperty
toolConfiguration = ToolConfigurationProperty -> Maybe ToolConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"ToolConfiguration" ChatPromptTemplateConfigurationProperty
ToolConfigurationProperty
newValue, [MessageProperty]
Maybe [PromptInputVariableProperty]
Maybe [SystemContentBlockProperty]
()
haddock_workaround_ :: ()
inputVariables :: Maybe [PromptInputVariableProperty]
messages :: [MessageProperty]
system :: Maybe [SystemContentBlockProperty]
haddock_workaround_ :: ()
inputVariables :: Maybe [PromptInputVariableProperty]
messages :: [MessageProperty]
system :: Maybe [SystemContentBlockProperty]
..}