feat!: SEP-1577 sampling with tools (#718)
Implements SEP-1577 sampling With tools closes #409 ## How Has This Been Tested? unit + integration ## Breaking Changes - binary changes - MediaContent -> SamplingMessageContent - ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [x] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update ## Checklist - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [x] I have added appropriate error handling - [x] I have added or updated documentation as needed
This commit is contained in:
parent
7474a33c56
commit
f434fcaff1
1 changed files with 1553 additions and 135 deletions
|
|
@ -176,11 +176,11 @@ fun Server.registerConformanceTools() {
|
|||
CreateMessageRequest(
|
||||
CreateMessageRequestParams(
|
||||
maxTokens = 10000,
|
||||
messages = listOf(SamplingMessage(Role.User, TextContent(prompt))),
|
||||
messages = listOf(SamplingMessage(Role.User, listOf(TextContent(prompt)))),
|
||||
),
|
||||
),
|
||||
)
|
||||
CallToolResult(listOf(TextContent(result.content.toString())))
|
||||
CallToolResult(listOf(TextContent(result.content.joinToString("\n") { it.toString() })))
|
||||
}
|
||||
|
||||
// 9. Elicitation
|
||||
|
|
|
|||
Loading…
Reference in a new issue