Add parameters ILoggerFactory and IServiceProvider to the HarnessAgent constructor,Also add the corresponding parameters to the AsHarnessAgent extension method。
c#
public HarnessAgent(IChatClient chatClient, int maxContextWindowTokens, int maxOutputTokens, HarnessAgentOptions? options = null,ILoggerFactory? loggerFactory = null,IServiceProvider? services = null)
public static HarnessAgent AsHarnessAgent(
this IChatClient chatClient,
int maxContextWindowTokens,
int maxOutputTokens,
HarnessAgentOptions? options = null,
ILoggerFactory? loggerFactory = null,
IServiceProvider? services = null) =>
new(chatClient, maxContextWindowTokens, maxOutputTokens, options);
Description
Add parameters ILoggerFactory and IServiceProvider to the HarnessAgent constructor,Also add the corresponding parameters to the AsHarnessAgent extension method。
Code Sample
c# public HarnessAgent(IChatClient chatClient, int maxContextWindowTokens, int maxOutputTokens, HarnessAgentOptions? options = null,ILoggerFactory? loggerFactory = null,IServiceProvider? services = null) public static HarnessAgent AsHarnessAgent( this IChatClient chatClient, int maxContextWindowTokens, int maxOutputTokens, HarnessAgentOptions? options = null, ILoggerFactory? loggerFactory = null, IServiceProvider? services = null) => new(chatClient, maxContextWindowTokens, maxOutputTokens, options);Language/SDK
.NET