Skip to content

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

@isaacwasserman

Description

@isaacwasserman

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions