Uh oh!
There was an error while loading. Please reload this page.
Add client sampling - #132
Conversation
SecretiveShell
commented
Jan 4, 2025
seems like the |
dsp-ant
commented
Jan 7, 2025
I like the concept here. Do you mind pushing this over the finish line? Cleanup, Documentation and Tests? |
SecretiveShell
commented
Jan 7, 2025
Glad you feel that this is the correct way to go about implementing this, if there are no desired changes I am happy to start pushing forwards with docs/testing. |
I've confirmed the functionality is working on my end. However, the testing is blocked by the issue with the sampling test tool in the everything server. Once that's fixed, I can add proper unit tests. Let me know if there are other changes needed in the meantime. |
SecretiveShell
commented
Feb 13, 2025
removing the assert statements verifying the sampling call-back signature will likely lead to client developers having to deal with really long tracebacks inside of sdk code, without good error messages. Is there any reason these were removed? |
SecretiveShell
commented
Feb 20, 2025
Superseded by #218 |
This adds a sampling request handler parameter to the
ClientSessionClass.Motivation and Context
This will allow for receiving sampling requests inside of python clients.
How Has This Been Tested?
This still needs extensive testing, but for now I have been testing using this example repo https://github.com/SecretiveShell/MCP-python-client-sampling-demo
Breaking Changes
None
Types of changes
Checklist
Additional context
Currently this PR is failing, the example tests work but the response from the everything server isThis is now resolvedresp.content[0].text='LLM sampling result: [object Object]'I am opening this as a draft PR for the opportunity to get feedback and iterate on the implementation.