Skip to content

Conversation

@lsl-2020
Copy link

  1. Change ChatOptions.Temperature from 0.2 to 1 because some models (such as o-series and preview ones such as gpt-5.2-chat) does not support Temperature parameter so it has to be default 1.
image image
  1. Add BEARER_TOKEN in launchsettings.json so that a365 develop get-token can update it automatically for local debugging. (Refer to recent change in Fix bearer token approach for Dotnet AF Sample #170)

@lsl-2020 lsl-2020 requested a review from a team as a code owner January 23, 2026 09:58
Copilot AI review requested due to automatic review settings January 23, 2026 09:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the .NET Agent Framework sample to improve compatibility with models that require default temperature settings and to support local debugging workflows that rely on an updatable BEARER_TOKEN.

Changes:

  • Set ChatOptions.Temperature to 1 (with explanatory comments) to avoid model incompatibilities with non-default temperature values.
  • Add Properties/launchSettings.json including BEARER_TOKEN for local debugging and token injection tooling.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
dotnet/agent-framework/sample-agent/Properties/launchSettings.json Adds a debug profile with environment variables for Development, including BEARER_TOKEN.
dotnet/agent-framework/sample-agent/Agent/MyAgent.cs Updates chat options to use Temperature = 1 and documents model constraints.

@lsl-2020 lsl-2020 changed the title Fix .Dotnet AF sample Fix Dotnet AF sample Jan 26, 2026
@lsl-2020
Copy link
Author

lsl-2020 commented Feb 1, 2026

Found the dev tools has updated the hit. Closing this now.

Detecting platform in: D:\playground\Agent365-Samples\dotnet\agent-framework\sample-agent
Detected .NET project (found 1 project file(s))
To use the bearer token in your .NET application, add it to launchSettings.json:
  Properties/launchSettings.json > profiles > [profile-name] > environmentVariables > BEARER_TOKEN
Token acquired successfully!

@lsl-2020 lsl-2020 closed this Feb 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants