Table of Contents

Class Extension

Namespace
AutoGen.WebAPI
Assembly
AutoGen.WebAPI.dll
public static class Extension
Inheritance
Extension
Inherited Members

Methods

UseAgentAsOpenAIChatCompletionEndpoint(IApplicationBuilder, IAgent)

Serve the agent as an OpenAI chat completion endpoint using OpenAIChatCompletionMiddleware. If the request path is /v1/chat/completions and model name is the same as the agent name, the request will be handled by the agent. otherwise, the request will be passed to the next middleware.

public static IApplicationBuilder UseAgentAsOpenAIChatCompletionEndpoint(this IApplicationBuilder app, IAgent agent)

Parameters

app IApplicationBuilder

application builder

agent IAgent

IAgent

Returns

IApplicationBuilder