mirror of
https://github.com/langchain-ai/langserve.git
synced 2026-07-01 20:14:01 -04:00
How to customize the processing process in the request chain? #144
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 @Lufffya on GitHub (Mar 21, 2024).
For example, if a file name is passed in, I want to determine in the server what the file name is by reading a pre-existing file, parsing it into text, and inputting it into the model.
Specifically, "HI" will be replaced by "HI.txt". I judge that if it is a file, read the file content as model input.
@eyurtsev commented on GitHub (Mar 27, 2024):
Prepend a runnable lambda to your chain to manipulate the input. (This is more of an LCEL question rather than langserve.)