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

[BUG] Can't provide model to OpenAi constructor #24

Open
isaacwasserman opened this issue Sep 16, 2024 · 0 comments
Open

[BUG] Can't provide model to OpenAi constructor #24

isaacwasserman opened this issue Sep 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@isaacwasserman
Copy link

Description

When instantiating mindsql.llms.OpenAi, the config parameter can only contain parameters to OpenAI's client constructor. This does not include model which must be passed to client.chat.completions.create. In MindSQL's OpenAi.invoke, the model parameter is expected to be in self.config, but it can't be.

Possible Solution

I think it's reasonable to include a model keyword param in the signature of the constructor. Otherwise, it could be removed from the input config prior to passing this config to the OpenAI client (this would avoid any breaking changes).

@isaacwasserman isaacwasserman added the bug Something isn't working label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant