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/FlowMultiTurnInputRequestEvent.h>
16#include <aws/bedrock-agent-runtime/model/FlowOutputEvent.h>
17#include <aws/bedrock-agent-runtime/model/FlowTraceEvent.h>
21namespace BedrockAgentRuntime
41 typedef std::function<void(
const FlowOutputEvent&)> FlowOutputEventCallback;
42 typedef std::function<void(
const FlowTraceEvent&)> FlowTraceEventCallback;
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 InvokeFlowInitialResponseCallbackEx m_onInitialResponse;
81 FlowCompletionEventCallback m_onFlowCompletionEvent;
82 FlowMultiTurnInputRequestEventCallback m_onFlowMultiTurnInputRequestEvent;
83 FlowOutputEventCallback m_onFlowOutputEvent;
84 FlowTraceEventCallback m_onFlowTraceEvent;
85 ErrorCallback m_onError;
88namespace 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)
void SetFlowTraceEventCallback(const FlowTraceEventCallback &callback)
void SetFlowMultiTurnInputRequestEventCallback(const FlowMultiTurnInputRequestEventCallback &callback)
AWS_BEDROCKAGENTRUNTIME_API InvokeFlowEventType GetInvokeFlowEventTypeForName(const Aws::String &name)
AWS_BEDROCKAGENTRUNTIME_API Aws::String GetNameForInvokeFlowEventType(InvokeFlowEventType value)
@ FLOWMULTITURNINPUTREQUESTEVENT
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String