Multimodal Evaluations
Uploading a file
How to upload files to run with multimodal inputs
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
How to upload files to run with multimodal inputs
# set up your client
import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: process.env['SGP_API_KEY'],
});
# upload the image
image = 'contents of your image'
file = client.beta.files.create(
file=image,
)
# assume input_data is the rest of your inputs for the test case.
# In order to include the image as data in the input, add the following object
input_data = {
**input_data,
"image": {
"file_id": file.id,
"file_type": "image"
}
}
