Skip to content

LangServe access POST data in path function fast api #327

Closed Answered by eyurtsev
seanmavley asked this question in Q&A
Discussion options

You must be logged in to vote

Hello! If I understood correctly, you're trying to access the payload fields on the backend of langserve and then do something with that in the context of runnables?

If so, I don't have any simpler examples than this right now that does some LCEL manipulation: https://github.com/langchain-ai/langserve/blob/main/examples/passthrough_dict/server.py

I'll try to add something simpler. Take a look at LCEL docs in langchain to create whatever runnable you need https://python.langchain.com/docs/expression_language/get_started.

Once the runnable is created and is exposed via add_routes, it's interface is pretty standard and you can include the input to the runnables via an input field in the post…

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by seanmavley
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@eyurtsev
Comment options

@seanmavley
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants