Skip to content

Commit

Permalink
primary contructor
Browse files Browse the repository at this point in the history
  • Loading branch information
colombod committed Nov 24, 2024
1 parent 0d1a2e0 commit 7be5dc7
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 7be5dc7

Please sign in to comment.