🐛 Fix function call bug, for real this time
This commit is contained in:
@@ -73,24 +73,21 @@ public class ThoughtProvider
|
||||
throw new IndexOutOfRangeException("Unknown thinking provider: " + ModelProviderType);
|
||||
}
|
||||
|
||||
// Add gRPC clients for Thought Plugins
|
||||
builder.Services.AddServiceDiscoveryCore();
|
||||
builder.Services.AddServiceDiscovery();
|
||||
builder.Services.AddAccountService();
|
||||
builder.Services.AddSphereService();
|
||||
|
||||
builder.Plugins.AddFromObject(new SnAccountKernelPlugin(_accountClient));
|
||||
builder.Plugins.AddFromObject(new SnPostKernelPlugin(_postClient));
|
||||
|
||||
return builder.Build();
|
||||
}
|
||||
|
||||
[Experimental("SKEXP0050")]
|
||||
private void InitializeHelperFunctions()
|
||||
{
|
||||
var accountPlugin = new SnAccountKernelPlugin(_accountClient);
|
||||
var postPlugin = new SnPostKernelPlugin(_postClient);
|
||||
|
||||
// Add Solar Network tools plugin
|
||||
Kernel.ImportPluginFromFunctions("solar_network", [
|
||||
KernelFunctionFactory.CreateFromMethod(accountPlugin.GetAccount),
|
||||
KernelFunctionFactory.CreateFromMethod(accountPlugin.GetAccountByName),
|
||||
KernelFunctionFactory.CreateFromMethod(postPlugin.GetPost),
|
||||
KernelFunctionFactory.CreateFromMethod(postPlugin.ListPosts),
|
||||
KernelFunctionFactory.CreateFromMethod(postPlugin.ListPostsWithinTime)
|
||||
]);
|
||||
|
||||
// Add web search plugins if configured
|
||||
var bingApiKey = _configuration.GetValue<string>("Thinking:BingApiKey");
|
||||
if (!string.IsNullOrEmpty(bingApiKey))
|
||||
|
||||
Reference in New Issue
Block a user