Skip to main content
Use this when you build the test case input yourself. To attach files while creating a test case, pass input_file_paths to Create Test Case instead: it is shorter and does the same upload. The one thing this method gives you that input_file_paths does not is reuse. Upload a document once and attach the same InputFile to many test cases, rather than uploading it per test case.

Returns

Returns an InputFile with uri, filename and mime_type. Place it in the input’s content list. The uri still carries the upload’s signature and expires. Galtea replaces it with the canonical, signature-free reference when the test case is written, and that is the one test_case.input_files reads back. Store that one, not this one.

Example

Parameters

string
required
Path to the file on the machine running the SDK. One file may be up to 20 MB, and must be one of these types: pdf, docx, xlsx, pptx, rtf, png, jpg, jpeg, tiff, tif, bmp, webp, heic, heif, gif, txt, csv, md, html, xml, json, eml. A storage URI is refused: there is nothing on this machine to upload, so attach it directly instead.
Evaluators cannot read files yet. A metric that reads the input is skipped when no turn is left with text of its own; log the text your pipeline extracted as the turn input, without the file, to have it scored. See File inputs.