Skip to content
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

.Net: Processes - Sample Pattern Adjustments #9181

Merged
merged 3 commits into from
Oct 9, 2024
Merged

Conversation

crickman
Copy link
Contributor

@crickman crickman commented Oct 9, 2024

Motivation and Context

Noticed some tiny stuff I wanted to make available for review, separate from the Agent sample.

Description

  • LocalKernelProcessContext is IDisposable - Update to incorporate using statement to ensure disposal (best practice)
  • Console.Write not resulting any output (`TextWriter.Write(char value) is an empty virtual method that requires override...or in this case interception - https://github.com/microsoft/referencesource/blob/master/mscorlib/system/io/textwriter.cs#L193.)
  • Simplify ScriptedUserInputStep abstraction. State is never null and can be treated as such with a minor tweak. (Null check in the sample could be misleading - it gave me momentary pause)
  • Removed redundant CreateKernelWithChatCompletion method where present (already in base class)
  • Simplified Step01_Processes.ChatBotState initialization. The conditional inner initialization might be slightly misleading (It gave me momentary pause).

Contribution Checklist

@crickman crickman self-assigned this Oct 9, 2024
@crickman crickman requested a review from a team as a code owner October 9, 2024 16:55
@markwallace-microsoft markwallace-microsoft added the .NET Issue or Pull requests regarding .NET code label Oct 9, 2024
@github-actions github-actions bot changed the title Processes - Sample Pattern Adjustments .Net: Processes - Sample Pattern Adjustments Oct 9, 2024
@crickman crickman added the PR: ready for review All feedback addressed, ready for reviews label Oct 9, 2024
@crickman crickman added experimental Associated with an experimental feature enhancement samples and removed enhancement labels Oct 9, 2024
@crickman crickman added this pull request to the merge queue Oct 9, 2024
Merged via the queue into main with commit 4364ad1 Oct 9, 2024
18 checks passed
@crickman crickman deleted the process-sample-tweaks branch October 9, 2024 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experimental Associated with an experimental feature .NET Issue or Pull requests regarding .NET code PR: ready for review All feedback addressed, ready for reviews processes samples
Projects
Status: Sprint: Done
Development

Successfully merging this pull request may close these issues.

4 participants