mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-04 18:09:40 +00:00
Added tool calling support (#731)
Co-authored-by: krut_ni <nils.kruthoff@dlr.de> Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
266 files changed
+11186
-740
No files matched your search
@@ -83,7 +83,7 @@ public static partial class PluginFactory
|
||||
}
|
||||
|
||||
var pluginPath = Path.GetDirectoryName(pluginMainFile)!;
|
||||
var plugin = await Load(pluginPath, code, cancellationToken);
|
||||
var plugin = await Load(pluginPath, code, cancellationToken: cancellationToken);
|
||||
|
||||
switch (plugin)
|
||||
{
|
||||
@@ -356,13 +356,13 @@ public static partial class PluginFactory
|
||||
|
||||
/// <param name="pluginPath">The directory the plugin is located in, or null when the code has no directory yet.</param>
|
||||
/// <param name="code">The Lua code of the plugin's main file.</param>
|
||||
/// <param name="cancellationToken">Cancellation token for running the Lua code.</param>
|
||||
/// <param name="allowedBaseDirectory">
|
||||
/// The directory the plugin path must be nested in. Without it, the installed plugins directory
|
||||
/// is used. Validating a plugin before its installation needs this, because the plugin lives in
|
||||
/// a staging directory at that point and could not load any of its own Lua modules otherwise.
|
||||
/// The directory the plugin path must be nested in. Without it, the installed plugins directory
|
||||
/// is used. Validating a plugin before its installation needs this, because the plugin lives in
|
||||
/// a staging directory at that point and could not load any of its own Lua modules otherwise.
|
||||
/// </param>
|
||||
public static async Task<PluginBase> Load(string? pluginPath, string code, CancellationToken cancellationToken = default, string? allowedBaseDirectory = null)
|
||||
/// <param name="cancellationToken">Cancellation token for running the Lua code.</param>
|
||||
public static async Task<PluginBase> Load(string? pluginPath, string code, string? allowedBaseDirectory = null, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if(ForbiddenPlugins.Check(code) is { IsForbidden: true } forbiddenState)
|
||||
return new NoPlugin($"This plugin is forbidden: {forbiddenState.Message}");
|
||||
|
||||
Reference in new issue
Block a user