Skip to content

Inquiry about the 'Accept' header #375

Open
@MartialBE

Description

@MartialBE

Confirm this is a feature request for the Node library and not the underlying OpenAI API.

  • This is a feature request for the Node library

Describe the feature or improvement you're requesting

Hello,

I am currently using the openai-node package for my project, and I have a question regarding the 'Accept' header in the request made at this specific code snippet: core.ts.

In the mentioned code, the 'Accept' header is set to "application/json". However, when the 'stream' option is set to true, the response I receive is in the format of "text/event-stream".

I am using a unified API platform that converts API interfaces from different platforms to OPENAI format. Due to some platforms validating the 'Accept' header value, I am facing issues with the API requests failing.

Could you please confirm if setting the 'Accept' header to "application/json" in the mentioned code is compliant with the specifications? if it should be modified based on the expected response type?

Thank you for your assistance.

Additional context

No response

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