Change type of Tool.InputSchema to be JsonElement (#4)
* Change type of Tool.InputSchema to be JsonElement * Add schema validation in the InputSchema property setter. * Simplify AIFunction tool adapter. --------- Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
This commit is contained in:
parent
d23e065945
commit
3de19d38e4
1 changed files with 175 additions and 128 deletions
|
|
@ -1,6 +1,7 @@
|
|||
using System.Threading.Channels;
|
||||
using ModelContextProtocol.Protocol.Messages;
|
||||
using ModelContextProtocol.Protocol.Transport;
|
||||
using ModelContextProtocol.Protocol.Types;
|
||||
|
||||
namespace ModelContextProtocol.Tests.Utils;
|
||||
|
||||
|
|
@ -71,7 +72,7 @@ public class TestServerTransport : IServerTransport
|
|||
await WriteMessageAsync(new JsonRpcResponse
|
||||
{
|
||||
Id = request.Id,
|
||||
Result = new Protocol.Types.CreateMessageResult { Content = new(), Model = "model", Role = "role" }
|
||||
Result = new CreateMessageResult { Content = new(), Model = "model", Role = "role" }
|
||||
}, cancellationToken);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue