mirror of
https://github.com/langchain-ai/langserve.git
synced 2026-07-18 10:54:29 -04:00
Invoke through forwarding message #121
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ezelanza on GitHub (Feb 13, 2024).
Hi
My scenario is FRONT_END(:5005/openaiapi)--> BACK_END(:8000/api_openai )-INVOKE -->OPENAI (API)
In my front end, I'm using Fastapi listening to /api_openai, to forward the request to openai wrapper
FRONT_END
BACKEND*
The funny thing is that the request works when I run on my Jupyter notebook
K8s, short for Kubernetes, is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications. It provides a highly scalable and flexible infrastructure for running and managing applications in a distributed environment.BUT It doesn't work when I curl the front end
Doing some troubleshooting I found that the problem is in this part of the front_end code. The front end is a fast api implementation intended to fw requests to .invoke. Which works when is directly accessed (Jupyter) but it doesn't work when is curl by the fe
openai_llm.invoke(prompt)
I'm using the same envs and nothing is different. Is there anything I should be aware when forwarding requests? Does .invoke need any additional detail on the request?
@eyurtsev commented on GitHub (Feb 14, 2024):
Try looking for the error message online -- I don't think this is LangServe related
e.g.,
https://support.prodi.gy/t/errno-99-error-while-attempting-to-bind-on-address-1-8080-0-0-cannot-assign-requested-address/3110