Overview
RikY2
RikY2 is a lightweight, flexible version of RikAI2, which has document understanding and sequential prompting capabilities. See our RikY2 Prompting Guide for tips on prompting this model.
How to Use
The question
parameter contains the natural language prompts you would like to submit to the model. This parameter accepts a string, or an array. The array can contain strings representing separate questions, or
arrays of strings. If the array contains arrays of strings, each nested array contains a question, while each subsequent string in that array is treated as a follow-up to that question. These follow-up questions allow you to break down a complex or multi-faceted prompt into smaller, separate prompts.
Example
{
"question": [
[
"What is the name of the patient?"
],
[
"What is the first medication listed under Section C - Medical Information?",
"What is its strength?"
]
]
}
When submitting an array of strings (e.g. ["What is the name of the patient?", "What is the patient's age?"]), you will get an answer per question. However, when submitting a nested array (question and follow-up questions), you will receive only one answer, rather than an answer per string.
Input and Output
Documents may be uploaded using an inputURL or through a base64 encoded string. Uploading a local file is supported via multi-part forms, which are available for the the Document input, JSON response endpoint.
The Chat and OCR input endpoints return a JSON response. Document input has a JSON response endpoint and a ZIP file response endpoint.
We also have a bulk upload endpoint to upload 1 or more files to the model for asynchronous processing. For this asynchronous endpoint, use either a webhook
(recommended) or an outputURL
to receive the model output:
- The
webhook
parameter is a URL where status updates and JSON responses will be sent. Click here to learn more about usingwebhook
andwebhookSendFull
parameters, including an example response. - The
outputURL
receives PUT requests made by the API. Its body is either a byte stream (for a ZIP file, default) or a JSON file (ifreturnJSON
is set to true). ZIP will contain the file you uploaded, a CSV file with a breakdown of the itemization, and both a JSON and TXT file containing the entire JSON response.