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/InvokeFlowInitialResponse.h>
14#include <aws/bedrock-agent-runtime/model/FlowCompletionEvent.h>
15#include <aws/bedrock-agent-runtime/model/FlowOutputEvent.h>
19namespace BedrockAgentRuntime
36 typedef std::function<void(
const FlowOutputEvent&)> FlowOutputEventCallback;
43 AWS_BEDROCKAGENTRUNTIME_API
virtual void OnEvent()
override;
68 AWS_BEDROCKAGENTRUNTIME_API
void HandleEventInMessage();
69 AWS_BEDROCKAGENTRUNTIME_API
void HandleErrorInMessage();
70 AWS_BEDROCKAGENTRUNTIME_API
void MarshallError(
const Aws::String& errorCode,
const Aws::String& errorMessage);
72 InvokeFlowInitialResponseCallbackEx m_onInitialResponse;
73 FlowCompletionEventCallback m_onFlowCompletionEvent;
74 FlowOutputEventCallback m_onFlowOutputEvent;
75 ErrorCallback m_onError;
78namespace InvokeFlowEventMapper
virtual AWS_BEDROCKAGENTRUNTIME_API void OnEvent() override
AWS_BEDROCKAGENTRUNTIME_API InvokeFlowHandler & operator=(const InvokeFlowHandler &)=default
AWS_BEDROCKAGENTRUNTIME_API InvokeFlowHandler()
void SetFlowOutputEventCallback(const FlowOutputEventCallback &callback)
InvokeFlowInitialResponseCallbackEx & GetInitialResponseCallbackEx()
void SetOnErrorCallback(const ErrorCallback &callback)
void SetFlowCompletionEventCallback(const FlowCompletionEventCallback &callback)
void SetInitialResponseCallbackEx(const InvokeFlowInitialResponseCallbackEx &callback)
void SetInitialResponseCallback(const InvokeFlowInitialResponseCallback &noArgCallback)
AWS_BEDROCKAGENTRUNTIME_API InvokeFlowEventType GetInvokeFlowEventTypeForName(const Aws::String &name)
AWS_BEDROCKAGENTRUNTIME_API Aws::String GetNameForInvokeFlowEventType(InvokeFlowEventType value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String