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

Added ability to configure temperature. #140

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

barrensconsulting
Copy link

The Claude Engineer Prompt for this change is below.

Change to allow configuration of temperature, sets it for all models. Code styling etc. should be consistent with current main.

update main.py to allow the user to configure the model temperature by setting a TEMPERATURE variable in the .env file.

if not set or invalid then the API default should be used - do NOT set the parameter on API calls in this case.

the value is set in the client.messages.create function.

prefer dictionary unpacking with comprehension to set the value in the API call (only if it has been supplied) to keep the code changes simple and minimal.

maintain consistency with existing environment variable handling and code.

if the user has set a TEMPERATURE variable, then display the setting after the existing welcome message.

The following Claude Engineer prompt was used for this change:
```
update main.py to allow the user to configure the model temperature by setting a TEMPERATURE variable in the .env file.

if not set or invalid then the API default should be used - do NOT set the parameter on API calls in this case.

the value is set in the client.messages.create function.

prefer dictionary unpacking with comprehension to set the value in the API call (only if it has been supplied) to keep the code changes simple and minimal.

maintain consistency with existing environment variable handling and code.

if the user has set a TEMPERATURE variable, then display the setting after the existing welcome message.
```
@evalstate
Copy link

Claude API has default temperature of 1, this change allows user configuration through a TEMPERATURE environment variable.

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.

2 participants