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 temperature parameter to RequestBody #1019

Merged
merged 3 commits into from
Oct 4, 2024

Conversation

kwilsonmg
Copy link
Contributor

@kwilsonmg kwilsonmg commented Sep 25, 2024

This addresses #1018 by adding the temperature parameter to RequestBody.


Important

Adds temperature parameter to RequestBody in batch.py, affecting request construction in BatchJob.create_from_messages().

  • Behavior:
    • Adds temperature parameter to RequestBody in batch.py with a default value of 1.0.
  • Classes:
    • Updates RequestBody class to include temperature.
    • Affects BatchModel class which uses RequestBody.
  • Methods:
    • Impacts BatchJob.create_from_messages() where RequestBody is instantiated.

This description was created by Ellipsis for 366fc28. It will automatically update as commits are pushed.

This addresses instructor-ai#1018 by adding the temperature parameter to RequestBody.
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 366fc28 in 10 seconds

More details
  • Looked at 12 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. instructor/batch.py:45
  • Draft comment:
    Consider adding validation to ensure temperature is within the range [0.0, 1.0] to prevent invalid values.
  • Reason this comment was not posted:
    Confidence changes required: 80%
    The temperature parameter should have validation to ensure it is within the acceptable range for OpenAI models.
2. instructor/batch.py:45
  • Draft comment:
    If the 'temperature' parameter affects library behavior, ensure that related documentation and tests are updated accordingly.
  • Reason this comment was not posted:
    Confidence changes required: 80%
    The code change introduces a new parameter 'temperature' to the RequestBody class. This change should be reflected in the documentation and tests.

Workflow ID: wflow_HORwSJ2QVDVC2eZU


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Utilize the new temperature field of RequestBody in create_from_messages.
@jxnl
Copy link
Collaborator

jxnl commented Sep 26, 2024

whoops sorry, i thought this was for create.

@ivanleomk please take a look next week

@jxnl jxnl closed this Sep 26, 2024
@jxnl jxnl reopened this Sep 26, 2024
@kwilsonmg
Copy link
Contributor Author

Thank you for re-opening this, @jxnl.

@jxnl jxnl merged commit 3302ba8 into instructor-ai:main Oct 4, 2024
8 of 12 checks passed
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