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

Fix o1 support #31

Merged
merged 4 commits into from
Nov 22, 2024
Merged

Fix o1 support #31

merged 4 commits into from
Nov 22, 2024

Conversation

ammirsm
Copy link
Contributor

@ammirsm ammirsm commented Nov 22, 2024

This pull request includes updates to the zenbase project, focusing on version updates, optimization of language model functions, and cleanup of test files.

Version update:

Optimization of language model functions:

  • py/src/zenbase/predefined/generic_lm_function/optimizer.py: Introduced a system_role variable to dynamically set the role based on the model prefix and refactored message creation logic in multiple functions to use this variable. Additionally, optimized the creation of kwargs for the chat.completions.create method by conditionally adding logprobs and top_logprobs only when the model does not start with "o1". [1] [2] [3]

Cleanup of test files:

…nOptimizer

- Define `system_role` based on model type for user prompts.
- Include contextual messages before user inputs to improve interaction flow.
- Update kwargs for completion creation to include necessary parameters conditionally.
Copy link
Contributor Author

@ammirsm ammirsm left a comment

Choose a reason for hiding this comment

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

LGTM

@ammirsm ammirsm self-assigned this Nov 22, 2024
@CyrusNuevoDia CyrusNuevoDia self-requested a review November 22, 2024 20:11
Copy link
Contributor

@CyrusNuevoDia CyrusNuevoDia left a comment

Choose a reason for hiding this comment

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

LGTM

@ammirsm ammirsm merged commit d276f78 into main Nov 22, 2024
0 of 3 checks passed
@ammirsm ammirsm deleted the fix-o1-support branch November 22, 2024 21:28
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