How to setup parameter for batch endpoint #143

Closed
opened 2026-02-16 00:18:58 -05:00 by yindo · 1 comment
Owner

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.

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.
yindo closed this issue 2026-02-16 00:18:58 -05:00
Author
Owner

@eyurtsev commented on GitHub (Mar 20, 2024):

inputs needs to be a list

inputs = [{"input": {"age": age, "json_example": json_example_4_subject}}]

@eyurtsev commented on GitHub (Mar 20, 2024): inputs needs to be a list inputs = [{"input": {"age": age, "json_example": json_example_4_subject}}]
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langserve#143