Namespace AutoGen.OpenAI.V1
Classes
- GPTAgent
GPT agent that can be used to connect to OpenAI chat models like GPT-3.5, GPT-4, etc.
GPTAgent supports the following message types as input:
- Message
- IMessage<T> where T is ChatRequestMessage
- AggregateMessage<TMessage1, TMessage2> where TMessage1 is ToolCallMessage and TMessage2 is ToolCallResultMessage
GPTAgent returns the following message types:
- AggregateMessage<TMessage1, TMessage2> where TMessage1 is ToolCallMessage and TMessage2 is ToolCallResultMessage
- OpenAIChatAgent
OpenAI client agent. This agent is a thin wrapper around OpenAIClient to provide a simple interface for chat completions. To better work with other agents, it's recommended to use GPTAgent which supports more message types and have a better compatibility with other agents.
OpenAIChatAgent supports the following message types:
- MessageEnvelope<T> where T is ChatRequestMessage: chat request message.
OpenAIChatAgent returns the following message types:
- MessageEnvelope<T> where T is ChatResponseMessage: chat response message. MessageEnvelope<T> where T is StreamingChatCompletionsUpdate: streaming chat completions update.
- OpenAIChatRequestMessageConnector
This middleware converts the incoming IMessage to IMessage<T> where T is ChatRequestMessage before sending to agent. And converts the output ChatResponseMessage to IMessage after receiving from agent.
Supported IMessage are
- IMessage<T> where T is ChatRequestMessage
- AggregateMessage<TMessage1, TMessage2> where TMessage1 is ToolCallMessage and TMessage2 is ToolCallResultMessage