mirror of
https://github.com/langchain-ai/langserve.git
synced 2026-07-21 00:55:22 -04:00
How to change the value of request body? #147
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 @Songjiadong on GitHub (Mar 23, 2024).
I want to change the request body value of
simple_invoke,would you give me a demo? I can't change request body value.Based on my experience with Java and C #, I believe this can be solved, but I am not very familiar with FastAPI . Can you help me?
Thanks!
@eyurtsev commented on GitHub (Mar 27, 2024):
What do you need to accomplish? I'm sure there's a way to mutate the Request body, but it's not super common practice.
If you're already mutating the request body, why not avoid using langserve and just use the underlying runnable with fast API directly?
Chat gpt suggests doing something like this: