create_invocation¶
Operation¶
create_invocation
¶
create_invocation(request: CreateInvocationInput | CreateInvocationInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateInvocationInputDict]) -> CreateInvocationOutput
Creates a new invocation within a session. An invocation groups the related invocation steps that store the content from a conversation. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
Related APIs
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CreateInvocationInput | CreateInvocationInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[CreateInvocationInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CreateInvocationOutput
|
An instance of |
create_invocation
async
¶
create_invocation(request: CreateInvocationInput | CreateInvocationInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateInvocationInputDict]) -> CreateInvocationOutput
Creates a new invocation within a session. An invocation groups the related invocation steps that store the content from a conversation. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
Related APIs
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CreateInvocationInput | CreateInvocationInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[CreateInvocationInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CreateInvocationOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
CreateInvocationInputDict
¶
Bases: TypedDict
Dictionary form of CreateInvocationInput.
CreateInvocationInput
dataclass
¶
Bases: _SerdeShape
Dataclass for CreateInvocationInput structure.
Attributes¶
description
class-attribute
instance-attribute
¶
description: str | None = ...
A description for the interactions in the invocation. For example, "User asking about weather in Seattle".
Output¶
CreateInvocationOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for CreateInvocationOutput structure.
Attributes¶
created_at
instance-attribute
¶
created_at: datetime
The timestamp for when the invocation was created.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.