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

Allow passing of can_stream in openai_models.py #600

Merged
merged 3 commits into from
Nov 6, 2024

Conversation

cmungall
Copy link
Contributor

Fixes #599

A longer term fix would be to use something like Pydantic so we don't repeat ourselves, but this would be a bit of a refactor

Fixes simonw#599 

A longer term fix would be to use something like Pydantic so we don't repeat ourselves, but this would be a bit of a refactor
@simonw
Copy link
Owner

simonw commented Nov 6, 2024

This fix doesn't look quite right to me.

The code currently defaults to assuming can_stream = True:

def __init__(
self,
model_id,
key=None,
model_name=None,
api_base=None,
api_type=None,
api_version=None,
api_engine=None,
headers=None,
can_stream=True,

With this change that will switch to assuming False (or None) for any models configured in the extra-openai-models.yaml file.

I think this should only take effect if can_models: False in the YAML.

@simonw simonw merged commit 3b2e526 into simonw:main Nov 6, 2024
1 of 31 checks passed
simonw added a commit that referenced this pull request Nov 14, 2024
simonw added a commit that referenced this pull request Nov 17, 2024
simonw added a commit that referenced this pull request Nov 18, 2024
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.

Allow setting can_stream in extra-openai-models.yaml to allow for o1 over proxy
2 participants