mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-04 16:49: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
@@ -0,0 +1,19 @@
|
||||
namespace AIStudio.Tools.ToolCallingSystem;
|
||||
|
||||
/// <summary>
|
||||
/// Supplies the definitions of the tools written in C#.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For a tool implemented in the app itself, the definition and the implementation are one
|
||||
/// object: the implementation states what it is. That removes the string key that used to join a
|
||||
/// definition file to its class, and with it the failure where a typo in that key made the tool
|
||||
/// disappear with nothing but a warning in the log.
|
||||
/// </remarks>
|
||||
public sealed class CodeToolDefinitionSource(IEnumerable<IToolImplementation> implementations) : IToolDefinitionSource
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public string SourceName => "code";
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<ToolDefinition> GetDefinitions() => implementations.Select(implementation => implementation.GetDefinition());
|
||||
}
|
||||
Reference in new issue
Block a user