Skip to content

temp#1185

Merged
zzstoatzz merged 1 commit into
mainfrom
gippity-5
Aug 7, 2025
Merged

temp#1185
zzstoatzz merged 1 commit into
mainfrom
gippity-5

Conversation

@zzstoatzz

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings August 7, 2025 19:01
@zzstoatzz zzstoatzz merged commit 0252dcb into main Aug 7, 2025
3 checks passed
@zzstoatzz zzstoatzz deleted the gippity-5 branch August 7, 2025 19:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 automatic temperature adjustment for GPT-5 models in the Slackbot settings. When a GPT-5 model is detected, the temperature is automatically set to 1.0.

  • Imports model_validator from pydantic for model-level validation
  • Adds a validator that sets temperature to 1.0 for any model containing "gpt-5"


@model_validator(mode="after")
def validate_temperature(self) -> "SlackbotSettings":
if "gpt-5" in self.model_name:

Copilot AI Aug 7, 2025

Copy link

Choose a reason for hiding this comment

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

The validator is checking self.model_name which is a property that calls Variable.get(), but this validation occurs during model initialization when the Variable system may not be properly initialized yet. This could cause the validator to fail or behave unexpectedly.

Copilot uses AI. Check for mistakes.
@model_validator(mode="after")
def validate_temperature(self) -> "SlackbotSettings":
if "gpt-5" in self.model_name:
self.temperature = 1.0

Copilot AI Aug 7, 2025

Copy link

Choose a reason for hiding this comment

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

Direct assignment to self.temperature in a model validator may not work as expected with Pydantic models. The temperature field should be validated and set through the proper Pydantic field validation mechanism or the validator should return a modified copy of the model.

Suggested change
self.temperature = 1.0
return self.model_copy(update={"temperature": 1.0})

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants