Note: There is a newer version (1.0.3) of this package available. Click here to view docs for the latest version.
Module ai.devant
sabtharm/ai.devant
1.0.2
Ballerina AI Devant Module
Overview
This module offers APIs to connect with Devant by WSO2, providing easy access to AI services like document chunking and AI-powered data processing. It also enables seamless integration of Devant features with the ballerina/ai
module.
Prerequisites
Before using this module in your Ballerina application, ensure you have the following
- A valid Devant AI service URL
- An access token to authenticate with the Devant platform
Quickstart
To use the ai.devant
module in your Ballerina application, follow these steps:
Step 1: Import the module
import ballerinax/ai.devant;
Step 2: Initialize the Devant AI Client
devant:Client devantClient = check new ("https://your-devant-service-url", "your-access-token");
Step 3: Use Devant AI Services
For example, chunk a document:
ai:Chunk[]|devant:Error chunks = devantClient->chunk("/path/to/document.pdf");