This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [{"id":1,"name":"bulbasaur","imageUrl":"https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/1.png"},{"id":2,"name":"ivysaur","imageUrl":"https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/2.png"},{"id":3,"name":"venusaur","imageUrl":"https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/3.png"},{"id":4,"name":"charmander","imageUrl":"https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/4.png"},{"id":5,"name":"charmeleon","imageUrl":"https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/5.png"},{"id":6,"name":"charizard","imageUrl":"https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/6.png"},{"id":7,"name":"squirtle","imageUrl":"https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/7.png"},{"id":8,"name":"wartortl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "id": 1, | |
| "name": "Atlanta Hawks", | |
| "city": "Atlanta", | |
| "abbreviation": "ATL", | |
| "logoUrl": "https://a.espncdn.com/i/teamlogos/nba/500/atl.png" | |
| }, | |
| { | |
| "id": 2, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "StudentId": 1, | |
| "FirstName": "Tom", | |
| "LastName": "Max", | |
| "School": "Nursing", | |
| "Gender": "Male", | |
| "DateOfBirth": "1998-06-12" | |
| }, | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using OpenAI; | |
| using OpenAI.Chat; | |
| using System.ClientModel; | |
| using System.Text; | |
| var model = "mistral-7b-v02-int4-cpu"; | |
| var baseUrl = "http://localhost:5272/v1/"; // root URL for local OpenAI-like server | |
| var apikey = "unused"; | |
| OpenAIClientOptions options = new OpenAIClientOptions(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Text; | |
| using Microsoft.SemanticKernel; | |
| using Microsoft.SemanticKernel.ChatCompletion; | |
| using Microsoft.SemanticKernel.Connectors.OpenAI; | |
| var model = "mistral-7b-v02-int4-cpu"; | |
| var baseUrl = "http://localhost:5272/v1/"; | |
| var apikey = "unused"; | |
| // Create a chat completion service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "GameId": 1, | |
| "Year": 1930, | |
| "Gender": "Men", | |
| "City": "Montevideo", | |
| "Country": "Uruguay", | |
| "Continent": "South America", | |
| "Winner": "Uruguay" | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ZodiacMcpTool { | |
| [Function("ZodiacMcpTool")] | |
| public IActionResult Run( | |
| [McpToolTrigger(McpToolDefinitions.ZodiacTool.Name, McpToolDefinitions.ZodiacTool.Description)] | |
| ToolInvocationContext context, | |
| [McpToolProperty(McpToolDefinitions.ZodiacTool.Param.Name, McpToolDefinitions.DataTypes.Number, McpToolDefinitions.ZodiacTool.Param.Description)] | |
| int year) | |
| { | |
| return new OkObjectResult($"Hi. I am {McpToolDefinitions.ZodiacTool.Name}!. The zodiac animal for the year {year} is: {GetZodiacAnimal(year)}"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class MultiplyNumbersMcpTool { | |
| [Function("MultiplyNumbersMcpTool")] | |
| public IActionResult Run( | |
| [McpToolTrigger(McpToolDefinitions.MultiplyNumbersTool.Name, McpToolDefinitions.MultiplyNumbersTool.Description)] | |
| ToolInvocationContext context, | |
| [McpToolProperty(McpToolDefinitions.MultiplyNumbersTool.Param1.Name, McpToolDefinitions.DataTypes.Number, McpToolDefinitions.MultiplyNumbersTool.Param1.Description)] | |
| int firstNumber, | |
| [McpToolProperty(McpToolDefinitions.MultiplyNumbersTool.Param2.Name, McpToolDefinitions.DataTypes.Number, McpToolDefinitions.MultiplyNumbersTool.Param2.Description)] | |
| int secondNumber) { | |
| return new OkObjectResult($"Hi. I am {McpToolDefinitions.MultiplyNumbersTool.Name}!. The result of {firstNumber} multiplied by {secondNumber} is: {firstNumber * secondNumber}"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ReverseMessageMcpTool { | |
| [Function("ReverseMessageMcpTool")] | |
| public IActionResult Run( | |
| [McpToolTrigger(McpToolDefinitions.ReverseMessageTool.Name, McpToolDefinitions.ReverseMessageTool.Description)] | |
| ToolInvocationContext context, | |
| [McpToolProperty(McpToolDefinitions.ReverseMessageTool.Param.Name, McpToolDefinitions.DataTypes.String, McpToolDefinitions.ReverseMessageTool.Param.Description)] | |
| string message | |
| ) { | |
| string reversedMessage = new string(message.ToCharArray().Reverse().ToArray()); | |
| return new OkObjectResult($"Hi. I'm {McpToolDefinitions.ReverseMessageTool.Name}!. The reversed message is: {reversedMessage}"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class McpToolDefinitions { | |
| public static class ReverseMessageTool | |
| { | |
| public const string Name = "ReverseMessageTool"; | |
| public const string Description = "Echoes back message in reverse."; | |
| public static class Param { | |
| public const string Name = "Message"; | |
| public const string Description = "The Message to reverse"; |
NewerOlder