1.1.0
Search
K

Alli Generative Answer API

The system has the ability to understand a question, and subsequently generate accurate and comprehensive responses by scanning through vast collections of source documents.
Kindly be advised that the utilization of Alli generative answer is not universally accessible to all clients. Should you express interest in utilizing Alli generative answer, we recommend that you reach out to your designated account manager for further information and guidance.

Getting the API KEY

Please provide your API key in the request header API-KEY. Your API key can be found in your dashboard Settings menu, under the General tab.

Providing User Information

You can add user information in the request header to specify who makes the call.
A user ID can be provided in the request header OWN-USER-ID. The user ID can be either a new one or an existing one, and if a new user ID is provided, Alli will create a new user with that ID. Any future API calls with the same OWN-USER-ID header will be considered as they're from the same user.
If you want to update the user's email address at the same time, you can provide the email address in the request header USER-EMAIL. Below is an example.
-H 'OWN-USER-ID: 5f1234567a409876c082487z' \
-H 'USER-EMAIL: [email protected]'
You cannot use non-ASCII characters for OWN-USER-ID. If the user ID includes any non-ASCII characters, you can encode the ID to base64 and use base64:CONVERTED_ID.
You can find saved user ID and email information in your Alli dashboard Customers menu.

Error Messages

Please read the error message you get if you don't get the response that you expected. For example, if you don't use the right HTTP method for the API, you'll get this type of error as response:
{“error”: “Method Not Allowed POST: /webapi/faq_feedbacks”}
post
https://backend.alli.ai
/webapi/generative_answer
Generative Answer
Available LLM Models
OpenAI Text Davinci = "davinci" GPT 3.5 Turbo = "turbo" Azure OpenAI Text Davinci = "azure_davinci" Azure GPT 3.5 Turbo = "azure_turbo" GPT 3.5 Turbo 16k = "turbo_16k" Azure GPT 3.5 Turbo 16k = "azure_turbo_16k" GPT 4 = "gpt4" GPT 4 32k = "gpt4_32k" Vertex AI Text Bison= "vertex_text_bison" Vertex AI Chat Bison = "vertex_chat_bison" Naver Hyper Clova = "hyper_clova_x_lk_0" Anthropic Claude 2 = "anthropic_claude_2" Allganize Llama 2 13b Finance Fine-tuned = "allganize_finance_13b"

Request Example

Please replace YOUR_API_KEY with your one in the example below. Please see getting-api-key section.
curl -X POST -d '{
"query": "can I disclose the composite ratings?",
"llm_model": "gpt4" }' \
-H 'API-KEY: YOUR API KEY' \
-H 'Content-Type: application/json' \
https://backend.alli.ai/webapi/generative_answer

Response Example

{
"answer": {
"blocks": [
{
"key": "k0",
"text": "You can disclose the composite ratings to bank management after the examiner-in-charge (EIC) has discussed the recommended component and composite ratings with senior management and, when appropriate, the board of directors near the conclusion of the examination [1]. Generally, in these situations, examiners should contact the regional office overseeing the institution and discuss the proposed ratings with the case manager or assistant regional director prior to disclosing the ratings to management or the board [3].",
"inlineStyleRanges": [],
"entityRanges": [
{
"key": 0,
"offset": 263,
"length": 3
},
{
"key": 1,
"offset": 517,
"length": 3
}
],
"type": "unstyled"
}
],
"entityMap": {
"0": {
"type": "LINK",
"mutability": "MUTABLE",
"data": {
"url": YOUR URL ADDRESS
}
},
"1": {
"type": "LINK",
"mutability": "MUTABLE",
"data": {
"url": YOUR URL ADDRESS
}
}
}
}
}
Last modified 1mo ago