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

Enhancement: Use HTTP 2.0 for OpenAI requests #3044

Open
1 task done
Manouchehri opened this issue Jun 12, 2024 · 5 comments · Fixed by #3052
Open
1 task done

Enhancement: Use HTTP 2.0 for OpenAI requests #3044

Manouchehri opened this issue Jun 12, 2024 · 5 comments · Fixed by #3052
Labels
enhancement New feature or request

Comments

@Manouchehri
Copy link

What features would you like to see added?

Should hopefully improve perf slightly. Right now requests to my LiteLLM (aka custom OpenAI API) endpoint are all HTTP/1.1 from what I see. =)

More details

See BerriAI/litellm#3533 (comment) for example code in Python. Not entirely sure how to do it with node.

Which components are impacted by your request?

General, Endpoints

Pictures

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Manouchehri Manouchehri added the enhancement New feature or request label Jun 12, 2024
@Manouchehri
Copy link
Author

See openai/openai-node#392 (comment) for more info.

@danny-avila
Copy link
Owner

https://github.com/openai/openai-node?tab=readme-ov-file#customizing-the-fetch-client

gotcha that's an easy implementation, thanks!

@Manouchehri
Copy link
Author

Thanks! Should I be seeing this working in https://github.com/danny-avila/LibreChat/pkgs/container/librechat-dev-api/229754456?tag=4416f69a9b299c03dd947e52a033af202672597d? It looks like requests are still HTTP/1.1 for me, but I might be doing something wrong. :)

@danny-avila danny-avila reopened this Jun 13, 2024
@danny-avila
Copy link
Owner

danny-avila commented Jun 13, 2024

@Manouchehri I see, there's a little more to configure to enable h2 by default

nodejs/undici#399
nodejs/undici#2750

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants