Skip to content

Commit

Permalink
primary contructor
Browse files Browse the repository at this point in the history
  • Loading branch information
colombod committed Nov 23, 2024
1 parent 3bce048 commit 82d4a4a
Showing 1 changed file with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@
using Microsoft.AutoGen.Abstractions;
using Microsoft.Extensions.AI;
namespace Microsoft.AutoGen.Agents;
public abstract class InferenceAgent<T> : AgentBase where T : IMessage, new()
public abstract class InferenceAgent<T>(
IAgentRuntime context,
EventTypes typeRegistry,
IChatClient client)
: AgentBase(context, typeRegistry)
where T : IMessage, new()
{
protected IChatClient ChatClient { get; }
public InferenceAgent(
IAgentRuntime context,
EventTypes typeRegistry, IChatClient client
) : base(context, typeRegistry)
{
ChatClient = client;
}
protected IChatClient ChatClient { get; } = client;

private Task<ChatCompletion> CompleteAsync(
IList<ChatMessage> chatMessages,
Expand Down

0 comments on commit 82d4a4a

Please sign in to comment.