Implement SEP-1319: Decouple Request Payload from RPC Methods (#617)
* feat: implement SEP-1319 Decouple Request Payload from RPC Methods * test: update tests * fix: update handler trait methods to use new types * fix: update examples * fix: correct deprecation version * fix: update wrapper macros to use new *Params type names
This commit is contained in:
parent
48e989b711
commit
9e881a645b
1 changed files with 913 additions and 278 deletions
|
|
@ -31,7 +31,7 @@ impl SamplingDemoClient {
|
|||
impl ClientHandler for SamplingDemoClient {
|
||||
async fn create_message(
|
||||
&self,
|
||||
params: CreateMessageRequestParam,
|
||||
params: CreateMessageRequestParams,
|
||||
_context: RequestContext<RoleClient>,
|
||||
) -> Result<CreateMessageResult, ErrorData> {
|
||||
tracing::info!("Received sampling request with {:?}", params);
|
||||
|
|
@ -101,7 +101,8 @@ async fn main() -> Result<()> {
|
|||
// Test the ask_llm tool
|
||||
tracing::info!("Testing ask_llm tool...");
|
||||
match client
|
||||
.call_tool(CallToolRequestParam {
|
||||
.call_tool(CallToolRequestParams {
|
||||
meta: None,
|
||||
name: "ask_llm".into(),
|
||||
arguments: Some(object!({
|
||||
"question": "Hello world"
|
||||
|
|
|
|||
Loading…
Reference in a new issue