{"id":23780610,"url":"https://github.com/devkimchi/semantic-kernel-streaming-api-sample","last_synced_at":"2025-04-12T22:37:24.000Z","repository":{"id":270305399,"uuid":"909950080","full_name":"devkimchi/semantic-kernel-streaming-api-sample","owner":"devkimchi","description":"This provides sample app that shows the ASP.NET Core streaming API capability with Semantic Kernel","archived":false,"fork":false,"pushed_at":"2025-01-13T08:42:58.000Z","size":30,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T16:46:40.265Z","etag":null,"topics":["asp-net","azure","azure-openai","dotnet","semantic-kernel","streaming-api"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devkimchi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-30T06:11:28.000Z","updated_at":"2025-03-07T03:31:23.000Z","dependencies_parsed_at":"2025-01-07T11:32:12.911Z","dependency_job_id":null,"html_url":"https://github.com/devkimchi/semantic-kernel-streaming-api-sample","commit_stats":null,"previous_names":["devkimchi/semantic-kernel-streaming-api-sample"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkimchi%2Fsemantic-kernel-streaming-api-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkimchi%2Fsemantic-kernel-streaming-api-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkimchi%2Fsemantic-kernel-streaming-api-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkimchi%2Fsemantic-kernel-streaming-api-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devkimchi","download_url":"https://codeload.github.com/devkimchi/semantic-kernel-streaming-api-sample/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643007,"owners_count":21138353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asp-net","azure","azure-openai","dotnet","semantic-kernel","streaming-api"],"created_at":"2025-01-01T11:13:21.409Z","updated_at":"2025-04-12T22:37:23.982Z","avatar_url":"https://github.com/devkimchi.png","language":"C#","readme":"# Semantic Kernel Streaming API Sample\n\nThis provides sample app that shows the ASP.NET Core streaming API capability with Semantic Kernel.\n\n## Prerequisites\n\n- [.NET 9+ SDK](https://dotnet.microsoft.com/download/dotnet/9.0)\n- [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) or [Visual Studio Code](https://code.visualstudio.com/) with [C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit)\n- [GitHub CLI](https://github.com/cli/cli#installation)\n- [Azure OpenAI](https://learn.microsoft.com/azure/ai-services/openai/overview)\n\n## Getting Started\n\n1. Get the Azure OpenAI access endpoint and key.\n\n1. Clone this repository.\n\n    ```bash\n    gh repo fork devkimchi/semantic-kernel-streaming-api-sample --clone\n    ```\n\n1. Change the directory to the repository.\n\n    ```bash\n    cd semantic-kernel-streaming-api-sample\n    ```\n\n1. Open `src/SKStreaming.ApiApp/appsettings.json` and update either the `Azure:OpenAI` section with your Azure OpenAI access endpoint and key or the `GitHub:Models` section with your GitHub PAT and Model ID.\n\n    ```json\n    {\n      \"Azure\": {\n        \"OpenAI\": {\n          \"Endpoint\": \"{{AZURE_OPENAI_ENDPOINT}}\",\n          \"ApiKey\": \"{{AZURE_OPENAI_API_KEY}}\",\n          \"DeploymentName\": \"{{AZURE_OPENAI_DEPLOYMENT_NAME}}\"\n        }\n      },\n\n      \"GitHub\": {\n        \"Models\": {\n          \"Endpoint\": \"https://models.inference.ai.azure.com\",\n          \"GitHubToken\": \"{{GITHUB_PAT}}\",\n          \"ModelId\": \"{{GITHUB_MODEL_ID}}\"\n        }\n      }\n    }\n    ```\n\n   \u003e **NOTE**: DO NOT commit this file back to the repository.\n\n1. In the same `appsettings.json` file, choose which LLM you will use. You can choose either `aoai` or `github`. As a default, it's set to `github`.\n\n    ```json\n    {\n      \"SemanticKernel\": {\n        \"ServiceId\": \"github\"\n      }\n    }\n    ```\n\n1. Build the sample apps.\n\n    ```bash\n    dotnet restore \u0026\u0026 dotnet build\n    ```\n\n1. Run the API app.\n\n    ```bash\n    dotnet run --project ./src/SKStreaming.ApiApp\n    ```\n\n1. Open a new terminal and run the console app.\n\n    ```bash\n    # Simple chat completion\n    dotnet run --project ./src/SKStreaming.ConsoleApp -- -t chat\n\n    # Streaming chat completion\n    dotnet run --project ./src/SKStreaming.ConsoleApp -- -t chat-streaming\n    ```\n\n   When you're asked, enter any prompt you want to chat, and see the difference between simple chat completion and streaming chat completion.\n\n1. For auto function calling, run the console app with the bookings option.\n\n    ```bash\n    # Book a meeting room\n    dotnet run --project ./src/SKStreaming.ConsoleApp -- -t bookings\n    ```\n\n   When you're asked, enter a prompt like \"Please book a meeting room\", and see the auto function calling in action.\n","funding_links":[],"categories":["dotnet"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevkimchi%2Fsemantic-kernel-streaming-api-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevkimchi%2Fsemantic-kernel-streaming-api-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevkimchi%2Fsemantic-kernel-streaming-api-sample/lists"}