mirror of
https://github.com/langchain-ai/langserve.git
synced 2026-07-01 20:14:01 -04:00
How to setup parameter for batch endpoint #143
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 @mail2mhossain on GitHub (Mar 20, 2024).
import requests
inputs = {"input": {"age": age, "json_example": json_example_4_subject}}
response = requests.post("http://localhost:8000/generate_subjects/batch", json=inputs)
#response = requests.post("http://localhost:8000/generate_subjects/invoke", json=inputs)
print(response.json())
In the above code, "invoke" is working BUT "batch" is not working.
@eyurtsev commented on GitHub (Mar 20, 2024):
inputs needs to be a list
inputs = [{"input": {"age": age, "json_example": json_example_4_subject}}]