Skip to main content

Vulavula Converse

Vulavula Converse is our platform for conversational AI

Features

Converse have a couple of features which includes:

  • NLU: Converse supports Natural Language Understanding (NLU) through Intent Classification and Named Entity Recognition (NER).

  • Multilingual Few-shot Intent Classification: Our platform enables few-shot learning for intent classification across multiple languages.

  • Generative Chat with RAG (Coming Soon): Stay tuned for upcoming features that will enable generative chat using Retrieval-Augmented Generation (RAG) techniques.

Entity Recognition

POST https://vulavula-services.lelapa.ai/api/v1/entity_recognition/process.

The Named Entity Recognition (NER) endpoint analyzes the provided text and identifies named entities such as persons, locations, and more. Each request can handle up to 2,000 tokens, with 180 tokens recommended for optimal performance.

BODY PARAMS

encoded_text string required.
This parameter represents the text input that will be analyzed for named entities. It is required for the endpoint to function properly. The encoded_text should be provided as a string and contains the text to be processed by the Named Entity Recognition (NER) model. The text may include any language and should ideally be encoded in a format suitable for NER processing, ensuring accurate entity detection.

HEADERS

X-CLIENT-TOKEN string required.
Represents the authentication token required for accessing the API. This header ensures that only authorized clients can make requests to the endpoint.

EXAMPLES

pdm add vulavula
from vulavula import VulavulaClient
client = VulavulaClient("<INSERT_TOKEN>")

entity_result = client.get_entities({'encoded_text': 'President Ramaphosa gaan loop by Emfuleni Municipality.'})
print("Entity Recognition Output:", entity_result)

RESPONSES

🟢 200 OK
The request was successful. Below is an example response body
[
{
"entity": "person",
"word": "Ramaphosa",
"start": 10,
"end": 19
},
{
"entity": "location",
"word": "Emfuleni Municipality",
"start": 33,
"end": 54
}
]

RESPONSE BODY PARAMS

Object
entity string required.
Specifies the type of the recognized entity (e.g., person, location).
word string required.
Contains the text representing the recognized entity.
start number required.
Indicates the starting index of the recognized entity in the input text.
end number required.
Indicates the ending index of the recognized entity in the input text.
🔴 400 Bad Request
The request was malformed or contained invalid data
🟠 401 Unauthorized
The client token is missing or invalid.
🔴 500 Internal Server Error
An unexpected error occurred on the server.

Multilingual Few-shot Intent Classification

POST https://vulavula-services.lelapa.ai/api/v1/classify.
Allows users to classify inputs into specified intents with minimal training data across multiple languages. Below is how the endpoint works:

BODY PARAMS

examples array of objects required.
Supply a minimum of two examples for each intent along with their corresponding intent classifications. Each example should include the intent it represents. Each Object has two keys.

  • intent: Specifies the name of the intent for which the example input is provided.
  • example: Contains the example input text.

inputs array of strings required.
An array of input texts that need to be classified into intents. These input texts are the ones for which the intent classification will be performed. For example: ["greeting", "goodbye", "happy", "sad", "none"]

HEADERS

X-CLIENT-TOKEN string required.
Represents the authentication token required for accessing the API. This header ensures that only authorized clients can make requests to the endpoint.

EXAMPLES

pdm add vulavula
from vulavula import VulavulaClient
client = VulavulaClient("<INSERT_TOKEN>")

classification_data = {
"examples": [
{"intent": "greeting", "example": "Hello!"},
{"intent": "greeting", "example": "Hi there!"},
{"intent": "greeting", "example": "Habari yako?"}, #how are you?
{"intent": "goodbye", "example": "Goodbye!"},
{"intent": "goodbye", "example": "See you later!"},
{"intent": "goodbye", "example": "Kwaheri"}, #bye
{"intent": "goodbye", "example": "Tutaonana baadaye"}, #see you later
],
"inputs": [
"Hey, how are you?",
"I must be going now."
]
}
classification_results = client.classify(classification_data)
print("Classification Results:", classification_results)

RESPONSES

🟢 200 OK

The request was successful.

The endpoint returns a JSON object containing the possible intents along with their corresponding scores or probabilities. For example:

[
{
"probabilities": [
{
"intent": "goodbye",
"score": 0.25613666
},
{
"intent": "greeting",
"score": 0.74386334
}
]
},
{
"probabilities": [
{
"intent": "goodbye",
"score": 0.6334656
},
{
"intent": "greeting",
"score": 0.36653438
}
]
}
]

RESPONSE BODY PARAMS

Object
probabilities array of objects required.
An array containing objects representing the probabilities of different intents for the input text.
intent string required.
A string indicating the name of the intent.
score number required.
A number representing the probability or confidence score of the corresponding intent. Higher scores indicate a higher likelihood that the input text belongs to that intent category.
🔴 400 Bad Request
The request was malformed or contained invalid data
🟠 401 Unauthorized
The client token is missing or invalid.
🔴 500 Internal Server Error
An unexpected error occurred on the server.

You can also checkout our Getting Started.