associate_agent_knowledge_base¶
Operation¶
associate_agent_knowledge_base
¶
associate_agent_knowledge_base(request: AssociateAgentKnowledgeBaseInput | AssociateAgentKnowledgeBaseInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[AssociateAgentKnowledgeBaseInputDict]) -> AssociateAgentKnowledgeBaseOutput
Associates a knowledge base with an agent. If a knowledge base is
associated and its indexState is set to Enabled, the agent queries
the knowledge base for information to augment its response to the user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
AssociateAgentKnowledgeBaseInput | AssociateAgentKnowledgeBaseInputDict | 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[AssociateAgentKnowledgeBaseInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
AssociateAgentKnowledgeBaseOutput
|
An instance of |
associate_agent_knowledge_base
async
¶
associate_agent_knowledge_base(request: AssociateAgentKnowledgeBaseInput | AssociateAgentKnowledgeBaseInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[AssociateAgentKnowledgeBaseInputDict]) -> AssociateAgentKnowledgeBaseOutput
Associates a knowledge base with an agent. If a knowledge base is
associated and its indexState is set to Enabled, the agent queries
the knowledge base for information to augment its response to the user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
AssociateAgentKnowledgeBaseInput | AssociateAgentKnowledgeBaseInputDict | 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[AssociateAgentKnowledgeBaseInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
AssociateAgentKnowledgeBaseOutput
|
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.
AssociateAgentKnowledgeBaseInputDict
¶
Bases: TypedDict
Dictionary form of AssociateAgentKnowledgeBaseInput.
Attributes¶
agent_id
instance-attribute
¶
The unique identifier of the agent with which you want to associate the knowledge base.
agent_version
instance-attribute
¶
The version of the agent with which you want to associate the knowledge base.
description
instance-attribute
¶
A description of what the agent should use the knowledge base for.
knowledge_base_id
instance-attribute
¶
The unique identifier of the knowledge base to associate with the agent.
knowledge_base_state
instance-attribute
¶
knowledge_base_state: str | None
Specifies whether to use the knowledge base or not when sending an InvokeAgent request.
AssociateAgentKnowledgeBaseInput
dataclass
¶
Bases: _SerdeShape
Dataclass for AssociateAgentKnowledgeBaseInput structure.
Attributes¶
agent_id
class-attribute
instance-attribute
¶
agent_id: str | None = ...
The unique identifier of the agent with which you want to associate the knowledge base.
agent_version
class-attribute
instance-attribute
¶
agent_version: str | None = ...
The version of the agent with which you want to associate the knowledge base.
description
class-attribute
instance-attribute
¶
description: str | None = ...
A description of what the agent should use the knowledge base for.
knowledge_base_id
class-attribute
instance-attribute
¶
knowledge_base_id: str | None = ...
The unique identifier of the knowledge base to associate with the agent.
knowledge_base_state
class-attribute
instance-attribute
¶
knowledge_base_state: str | None = ...
Specifies whether to use the knowledge base or not when sending an InvokeAgent request.
Output¶
AssociateAgentKnowledgeBaseOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for AssociateAgentKnowledgeBaseOutput structure.
Attributes¶
agent_knowledge_base
instance-attribute
¶
agent_knowledge_base: AgentKnowledgeBase
Contains details about the knowledge base that has been associated with the agent.
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.