sglang icon indicating copy to clipboard operation
sglang copied to clipboard

for llava, how to send image rather than image_path?

Open lss15151161 opened this issue 1 year ago • 2 comments

current example(srt_example_llava.py) request like this: state = image_qa.run( image_path="./images/cat.jpeg", question="What is this?", max_new_tokens=64 )

but, if i want to send request like below, what should I do? request = { "text": ["What is this?".encode()], "images": [open("./images/cat.jpeg", "rb").read()] }

lss15151161 avatar Feb 21 '24 09:02 lss15151161