File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -393,20 +393,20 @@ import {CreateMessageResult} from "@modelcontextprotocol/sdk/types.js";
393
393
394
394
// Async Function to send a sampling request to the LLM at top-level
395
395
async function samplingExample(server : McpServer ): Promise <CreateMessageResult > {
396
- const samplingText = " Text prompt to send to LLM" ;
397
- const result = await McpServer .server .createMessage (
398
- {
399
- messages : [{
400
- role: " user" ,
401
- content: {
402
- text: samplingText ,
403
- type: " text"
404
- }
405
- }],
406
- maxTokens: 1000
407
- }
408
- );
409
- return result ;
396
+ const samplingText = " Text prompt to send to LLM" ;
397
+ const result = await McpServer .server .createMessage (
398
+ {
399
+ messages : [{
400
+ role: " user" ,
401
+ content: {
402
+ text: samplingText ,
403
+ type: " text"
404
+ }
405
+ }],
406
+ maxTokens: 1000
407
+ }
408
+ );
409
+ return result ;
410
410
}
411
411
412
412
// Sampling request just after connecting to MCP Client
You can’t perform that action at this time.
0 commit comments