OpenToolSDK.DotNet
0.2.1
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package OpenToolSDK.DotNet --version 0.2.1
NuGet\Install-Package OpenToolSDK.DotNet -Version 0.2.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OpenToolSDK.DotNet" Version="0.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OpenToolSDK.DotNet" Version="0.2.1" />
<PackageReference Include="OpenToolSDK.DotNet" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OpenToolSDK.DotNet --version 0.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: OpenToolSDK.DotNet, 0.2.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OpenToolSDK.DotNet@0.2.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OpenToolSDK.DotNet&version=0.2.1
#tool nuget:?package=OpenToolSDK.DotNet&version=0.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
OpenTool SDK for .NET Framework
English | 中文
The OpenTool SDK for .NET Framework supports Tool Server and Client communication over the JSON-RPC protocol, implementing the core capabilities defined in the OpenTool specification.
Features
- OpenTool JSON parser
- JSON-RPC over HTTP Client and Server
- API Key authorization middleware
- Interoperability with OpenTool Client/Server implemented in C# .NET Framework
Add the following dependency in your NuGet configuration:
OpenToolSDK
Examples
Implementing a sample Tool:
public class MockTool : ITool { public Task<Dictionary<string, object>> Call(string name, Dictionary<string, object> arguments) { if (name == "count") { return Task.FromResult(new Dictionary<string, object> { {"count", 42} }); } else { throw new FunctionNotSupportedException(name); } } public Task<OpenTool> Load() { string jsonPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "example", "server", "mock_tool.json"); var loader = new OpenToolJsonLoader(); return Task.FromResult(loader.LoadFromFile(jsonPath)); } }Starting the OpenTool Server:
ITool tool = new MockTool(); IServer server = new OpenToolServer(tool, version: "1.0.0", apiKeys: new List<string> { "6621c8a3-2110-4e6a-9d62-70ccd467e789", "bb31b6a6-1fda-4214-8cd6-b1403842070c" }); await server.Start();
Usage Notes
- The default port is
9627. You can change it via theOpenToolServerconstructor. - A new Tool must implement the
IToolinterface, specifically theCallmethod. It is recommended to implementLoadto load OpenTool JSON descriptions. - It is recommended to use OpenTool specification JSON files to define tools. Constructing
OpenToolobjects programmatically is also supported.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net48 is compatible. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.8
- Microsoft.AspNet.WebApi.Client (>= 6.0.0)
- Microsoft.AspNet.WebApi.Core (>= 5.3.0)
- Microsoft.AspNet.WebApi.Owin (>= 5.3.0)
- Microsoft.AspNet.WebApi.OwinSelfHost (>= 5.3.0)
- Microsoft.Owin (>= 4.2.3)
- Microsoft.Owin.Host.HttpListener (>= 4.2.3)
- Microsoft.Owin.Hosting (>= 4.2.3)
- Newtonsoft.Json (>= 13.0.3)
- Newtonsoft.Json.Bson (>= 1.0.2)
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
- System.Numerics.Vectors (>= 4.5.0)
- System.Runtime.CompilerServices.Unsafe (>= 4.5.3)
- System.Threading.Tasks.Extensions (>= 4.5.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|