updateAgentCollaborator method
Updates an agent's collaborator.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter agentDescriptor :
An agent descriptor for the agent collaborator.
Parameter agentId :
The agent's ID.
Parameter agentVersion :
The agent's version.
Parameter collaborationInstruction :
Instruction for the collaborator.
Parameter collaboratorId :
The collaborator's ID.
Parameter collaboratorName :
The collaborator's name.
Parameter relayConversationHistory :
A relay conversation history for the collaborator.
Implementation
Future<UpdateAgentCollaboratorResponse> updateAgentCollaborator({
required AgentDescriptor agentDescriptor,
required String agentId,
required String agentVersion,
required String collaborationInstruction,
required String collaboratorId,
required String collaboratorName,
RelayConversationHistory? relayConversationHistory,
}) async {
final $payload = <String, dynamic>{
'agentDescriptor': agentDescriptor,
'collaborationInstruction': collaborationInstruction,
'collaboratorName': collaboratorName,
if (relayConversationHistory != null)
'relayConversationHistory': relayConversationHistory.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/agents/${Uri.encodeComponent(agentId)}/agentversions/${Uri.encodeComponent(agentVersion)}/agentcollaborators/${Uri.encodeComponent(collaboratorId)}/',
exceptionFnMap: _exceptionFns,
);
return UpdateAgentCollaboratorResponse.fromJson(response);
}