Table of Contents

Class GeminiMessageConnector

Namespace
AutoGen.Gemini
Assembly
AutoGen.Gemini.dll
public class GeminiMessageConnector : IStreamingMiddleware, IMiddleware
Inheritance
GeminiMessageConnector
Implements
Inherited Members

Constructors

GeminiMessageConnector(bool)

Initializes a new instance of the GeminiMessageConnector class.

public GeminiMessageConnector(bool strictMode = false)

Parameters

strictMode bool

whether 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

public string Name { get; }

Property Value

string

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 IAgent
cancellationToken CancellationToken

Returns

Task<IMessage>

InvokeAsync(MiddlewareContext, IStreamingAgent, CancellationToken)

public IAsyncEnumerable<IMessage> InvokeAsync(MiddlewareContext context, IStreamingAgent agent, CancellationToken cancellationToken = default)

Parameters

context MiddlewareContext
agent IStreamingAgent
cancellationToken CancellationToken

Returns

IAsyncEnumerable<IMessage>