7#include <aws/core/utils/HashingUtils.h>
8#include <aws/core/utils/event/EventStreamHandler.h>
9#include <aws/core/client/AWSError.h>
10#include <aws/bedrock-agent-runtime/BedrockAgentRuntime_EXPORTS.h>
11#include <aws/bedrock-agent-runtime/BedrockAgentRuntimeErrors.h>
13#include <aws/bedrock-agent-runtime/model/InvokeAgentInitialResponse.h>
14#include <aws/bedrock-agent-runtime/model/PayloadPart.h>
15#include <aws/bedrock-agent-runtime/model/FilePart.h>
16#include <aws/bedrock-agent-runtime/model/ReturnControlPayload.h>
17#include <aws/bedrock-agent-runtime/model/TracePart.h>
21namespace BedrockAgentRuntime
39 typedef std::function<void(
const PayloadPart&)> PayloadPartCallback;
40 typedef std::function<void(
const FilePart&)> FilePartCallback;
42 typedef std::function<void(
const TracePart&)> TracePartCallback;
49 AWS_BEDROCKAGENTRUNTIME_API
virtual void OnEvent()
override;
76 AWS_BEDROCKAGENTRUNTIME_API
void HandleEventInMessage();
77 AWS_BEDROCKAGENTRUNTIME_API
void HandleErrorInMessage();
78 AWS_BEDROCKAGENTRUNTIME_API
void MarshallError(
const Aws::String& errorCode,
const Aws::String& errorMessage);
80 InvokeAgentInitialResponseCallbackEx m_onInitialResponse;
81 PayloadPartCallback m_onPayloadPart;
82 FilePartCallback m_onFilePart;
83 ReturnControlPayloadCallback m_onReturnControlPayload;
84 TracePartCallback m_onTracePart;
85 ErrorCallback m_onError;
88namespace InvokeAgentEventMapper
virtual AWS_BEDROCKAGENTRUNTIME_API void OnEvent() override
AWS_BEDROCKAGENTRUNTIME_API InvokeAgentHandler & operator=(const InvokeAgentHandler &)=default
void SetPayloadPartCallback(const PayloadPartCallback &callback)
void SetReturnControlPayloadCallback(const ReturnControlPayloadCallback &callback)
void SetFilePartCallback(const FilePartCallback &callback)
void SetOnErrorCallback(const ErrorCallback &callback)
InvokeAgentInitialResponseCallbackEx & GetInitialResponseCallbackEx()
void SetTracePartCallback(const TracePartCallback &callback)
void SetInitialResponseCallbackEx(const InvokeAgentInitialResponseCallbackEx &callback)
AWS_BEDROCKAGENTRUNTIME_API InvokeAgentHandler()
void SetInitialResponseCallback(const InvokeAgentInitialResponseCallback &noArgCallback)
AWS_BEDROCKAGENTRUNTIME_API InvokeAgentEventType GetInvokeAgentEventTypeForName(const Aws::String &name)
AWS_BEDROCKAGENTRUNTIME_API Aws::String GetNameForInvokeAgentEventType(InvokeAgentEventType value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String