docs: add .NET example for interactive weather assistant#119
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a .NET/C# code example to the "Step 5: Build an Interactive Assistant" section of the getting-started documentation, which previously only had Node.js and Python examples.
Changes:
- Added a complete .NET interactive weather assistant example that demonstrates tool usage, streaming, and console interaction patterns
- Includes setup instructions and run commands consistent with other language examples
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Use Random.Shared instead of new Random() for thread-safe random generation - Add SessionIdleEvent handler for consistent output formatting
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| </details> | ||
|
|
||
| <details> |
There was a problem hiding this comment.
The PR description states "The getting-started guide already had comprehensive examples for Node.js, Python, and Go for the interactive assistant section" but there is no Go example in Step 5 (Build an Interactive Assistant). Only Node.js and Python examples exist in this section. The description should be corrected to accurately reflect that this PR adds the .NET example alongside the existing Node.js and Python examples (not Go).
There was a problem hiding this comment.
Updated PR description.
vicperdana
left a comment
There was a problem hiding this comment.
Resolved all Copilot Review.
|
|
||
| </details> | ||
|
|
||
| <details> |
There was a problem hiding this comment.
Updated PR description.
Summary
This PR adds a .NET example to the "Step 5: Build an Interactive Assistant" section in the getting-started documentation.
Changes
AIFunctionFactory.Createto define a weather toolCopilotClientand session with streaming enabledAssistantMessageDeltaEventfor real-time outputSessionIdleEventfor consistent output formattingWhy
The getting-started guide already had comprehensive examples for Node.js and Python for the interactive assistant section, but was missing the .NET equivalent. This addition ensures .NET developers have the same level of guidance as other language users.
Testing
The code follows the established patterns in the .NET SDK and matches the structure of other examples in the documentation.