Skip to content

Missing API key and endpoint configuration...(etc) in OpenAI() and support for Azure OpenAI #1086

Description

@NaraSyuhei

Hi

Thank you for your continued efforts on this project. I’ve encountered an issue while using the following code:

client = instructor.from_openai(OpenAI())

client = instructor.from_openai(AsyncOpenAI())

It seems that the OpenAI() initialization is missing some necessary configurations, such as the API key and endpoint settings. Without these configurations, it doesn't seem to function as expected.

Additionally, I would like to suggest making it compatible with Azure OpenAI as well. This would broaden the utility of the library for those using Azure's services.

Could you please confirm if the OpenAI() configuration needs to include these parameters, and if there's a possibility to support Azure OpenAI in the future?

Thank you for considering this, and I appreciate your hard work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions