Class GeminiMessageConnector
- Inheritance
-
Gemini
Message Connector
- Implements
- Inherited Members
Constructors
GeminiMessageConnector(bool)
Initializes a new instance of the Gemini
Parameters
strictMode
boolwhether to throw an exception if it encounters an unsupport message type. If true, the connector will throw an exception if it encounters an unsupport message type. If false, it will ignore processing the message and return the message as is.
Properties
Name
the name of the middleware
Property Value
Methods
InvokeAsync(MiddlewareContext, IAgent, CancellationToken)
The method to invoke the middleware
public Task<IMessage> InvokeAsync(MiddlewareContext context, IAgent agent, CancellationToken cancellationToken = default)
Parameters
context
MiddlewareContext agent
IAgentcancellationToken
CancellationToken
Returns
InvokeAsync(MiddlewareContext, IStreamingAgent, CancellationToken)
The streaming version of Invoke
public IAsyncEnumerable<IMessage> InvokeAsync(MiddlewareContext context, IStreamingAgent agent, CancellationToken cancellationToken = default)
Parameters
context
MiddlewareContext agent
IStreamingAgent cancellationToken
CancellationToken