Any smart contract supporting dapp to dapp request cant initiate an AI task by calling the BAI smart contract and wait to receive the result through a callback.
BAI SMART CONTRACT
To request a task on chain on the BNB Chain, smart contract have to send their request to the following contract:
TESTNET
ContractAddress: 0xA3c6967209A749412c2DBD30EeC01D1e50e7cb55Decimal: 18Name: BAI
Smart Contract need to send their request to the registerTaskCallback (description: string, type: string, callback: string) method.
Description:
The prompt or URL (for the video summarizer)
Task type:
The AI task type (see available type list below)
Callback:
The name of the method to call back once the task is resolved.
The callback have to be on the caller contract and it have to accept one parameter as string.
AVAILABLE TASK TYPES
Simple Text Request:
chatgpt, orca, gemini, llama3