langflow icon indicating copy to clipboard operation
langflow copied to clipboard

langflow API Request, Body not able to pass array.

Open irshadmb opened this issue 1 year ago • 6 comments

Bug Description

langflow API Request, Body not able to pass array.

Reproduction

  1. Not able to pass array, example ["Ball", "Bat"]

Expected behavior

Need to pass JSON key, value as well as array.

Who can help?

No response

Operating System

Docker

Langflow Version

1.1

Python Version

None

Screenshot

No response

Flow File

No response

irshadmb avatar Nov 27 '24 09:11 irshadmb

hey @irshadmb thanks for the feedback, can you please explain exactly what are you trying to do?

anovazzi1 avatar Nov 27 '24 18:11 anovazzi1

I am using a API request, in body I want to pass json array as given in example like ["bat", "ball"] but in API request component I am unable to add it allows only json key, value pair.

irshadmb avatar Nov 27 '24 18:11 irshadmb

which endpoint are you using?

anovazzi1 avatar Nov 27 '24 19:11 anovazzi1

I have my own api endpoint which will accept json array in body and return some json which I want to use in Langflow to push to a vector db.

irshadmb avatar Nov 27 '24 19:11 irshadmb

Hi @anovazzi1 Sample postman image

How do i edit body as array image

Which is stating i can add array : image

irshadmb avatar Nov 28 '24 06:11 irshadmb

@irshadmb now I understood, that's really a bug, we will fix it, thanks for the feedback

anovazzi1 avatar Nov 29 '24 18:11 anovazzi1

fixed in #5122

anovazzi1 avatar Dec 11 '24 15:12 anovazzi1

Thanks @anovazzi1

irshadmb avatar Dec 11 '24 15:12 irshadmb