-
Notifications
You must be signed in to change notification settings - Fork 431
docs: add .NET example for interactive weather assistant #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
docs: add .NET example for interactive weather assistant #119
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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> |
Copilot
AI
Jan 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated PR description.
vicperdana
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved all Copilot Review.
|
|
||
| </details> | ||
|
|
||
| <details> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.