davidmigloz / langchain_dart

Build LLM-powered Dart/Flutter applications.
https://langchaindart.dev
MIT License
426 stars 75 forks source link

refactor: Don't send OpenAI-Beta header in ChatOpenAI #511

Closed davidmigloz closed 3 months ago

davidmigloz commented 3 months ago

OpenAI-Beta header is only required if you use OpenAI beta features (like the Assistant API). ChatOpenAI doesn't use any beta API. However OpenAIClient adds this header by default, which seems to cause issues with some OpenAI compatible APIs (like OpenRouter).