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

Python: Default logit-bias {} instead of None #2005

Merged
merged 18 commits into from
Jul 15, 2023

Conversation

awharrison-28
Copy link
Contributor

Motivation and Context

The openai API expects that logit bias is always a set. Passing None will not be successful.

Description

  • if logit-bias is None, pass {} to the openai request create call

Contribution Checklist

@awharrison-28 awharrison-28 requested a review from a team as a code owner July 15, 2023 01:04
@shawncal shawncal added the python Pull requests for the Python Semantic Kernel label Jul 15, 2023
@awharrison-28 awharrison-28 added this pull request to the merge queue Jul 15, 2023
Merged via the queue into main with commit 43b62e5 Jul 15, 2023
31 checks passed
piotrek-appstream pushed a commit to Appstream-Studio/semantic-kernel that referenced this pull request Jul 19, 2023
### Motivation and Context
The openai API expects that logit bias is always a set. Passing None
will not be successful.

### Description
- if logit-bias is None, pass {} to the openai request create call

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#dev-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
Co-authored-by: Shawn Callegari <36091529+shawncal@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests for the Python Semantic Kernel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants