Lazarus RikAI2
| Lazarus RikAI2 |
Author Taiki Shimasaki
Primary Features
Lazarus RikAI2 is one of the custom models from Lazarus Forms. It is a comprehensive conversational AI focusing on document processing. The solution takes any document (PDF, JPG, PNG, or TIFF) and one or more “questions” as input and returns “question(s), answer(s)” in CSV format as standard output. The plugin has an advanced menu where users can choose JSON and YAML as outputs for easier processing.
To use this plugin, you must obtain API credentials from this link https://api.lazarusforms.com/signup For more information, please visit Lazarus Forms API Documentation page. |
Currently, this plugin is not available due to a change in the RikAI2 API specification.
It will be supported in the future, but please check the bottom of the page for detailed usage at this time.
A new plugin that supports the new asynchronous API is now available! Please check it out here :
Input (Requirement)
orgId
authKey
Image File (PDF, jpeg, png, and Tiff
Question (one or more)
Input (Optional for additional infomation)
Questions with File (.txt) - multiple questions can be separated by new line (line feed)
JSON
YAML
Encode for special charactors
Return Value
Question and answers in a CSV format with headers [question,answer]
Return Code
0 Success
1 Invalid Org ID or Auth Key
2 Invalid input image file format
99 misc. errors
Parameter Setting samples
The new API specification
- About the new API
The new API does not return answers to questions in response.
Answers are now sent per process via webhook.
For more information, please check the following :
https://docs.lazarusforms.com/docs/rikai-2/rikai2-overview
- How to use
For information on how to use the API, check the documentation at the following URL.
https://docs.lazarusforms.com/docs/rikai-2/rikai2/operations/create-a-rikai-bulk
The following is one sample using API Requests.
Set the Headers as follows
"orgId": "your_org_id"
"authKey": "your_auth_key"
"Content-Type": "application/json"
Set the JSON data file as follows(Sample)
JSON to send
{ "inputUrl": ["---your_input_url_of_the_image---"],
"question": ["---question---"],
"returnOCR": "True",
"language": "en",
"settings": {
"advanced_vision": "True",
"sendFile": "True"
},
"metadata": {"docId": "---doc-id---"}, // Freely create in JSON format
"webhook": "---your_whbhook_url---",
"webhookSendFull": "True",
"forceOCR": "True",
"outputURL": "---your_output_url---"
}
- How to receive Webhook
The next method is to set up a server in Python to receive webhooks.
A sample script for a server to receive webhooks in Python looks like this :
code1
import http.server
import socketserver
import datetime
import base64
import json
class MyHandler(http.server.BaseHTTPRequestHandler):
def do_POST(self):
content_length = int(self.headers['content-length'])
# Get Body
now = datetime.datetime.now()
req_body = self.rfile.read(content_length).decode("utf-8")
json_body = json.loads(req_body)
if json_body["status"] == "SUCCESS":
# Processing docId
doc_id = json_body["metadata"]["docId"]
doc_id_dec = base64.b64decode(doc_id).decode('utf-8')
pam_id = str(doc_id_dec).split('+')[0]
# Create Output JSON
file_name = pam_id + '_' + str(doc_id) + '_' + now.strftime('%Y%m%d%H%M%S') + '.json'
with open(file_name, 'w', encoding='utf-8') as f:
json.dump(json_body, f, indent=3, ensure_ascii=False)
# Response
self.send_response(200)
self.send_header('Content-Type', 'text/plain; charset=utf-8')
self.end_headers()
with socketserver.TCPServer(("", 80), MyHandler) as httpd:
httpd.serve_forever()
Can download it from the following link :
Here, the ”docId” is set in the ”metadata” above, and a process is built in to disassemble and process it.
The ”docId” is set to “PAMID” + “Requests sent date and time” encoded in Base64.
Running this as a server will allow you to receive webhooks.
All that remains is to set the published URL or IP address as the WebhookURL.
- ABBYY Download
- ABBYY Status
- ABBYY Upload
- AD LDAP
- Adv Send Email
- API Requests
- ARGOS API
- Arithmetic Op
- ASCII Converter
- Attach Image
- AWS S3
- AWS Textra Rekog
- Base64
- Basic Numerical Operations
- Basic String Manipulation
- Bot Collabo
- Box
- Box II
- Box JWT
- Break Loop
- Chatwork GetMessage
- Chatwork Notification
- Citizen Log
- Clipboard
- Codat API
- Convert CharSet
- Convert Image
- Convert Image II
- Create Newfile
- CSV2XLSX
- Dashboard Api
- DashBord Api
- Data Plot I
- Date OP
- DeepL Free
- Detect CharSet
- Dialog Calendar
- Dialog Error
- Dialog File Selection
- Dialog Forms
- Dialog Info
- Dialog Password
- Dialog Question
- Dialog Text Entry
- Dialog Text Info
- Dialog Warning
- DirectCloud API
- Doc2TXT
- DocDigitizer Get Doc
- DocDigitizer Tracking
- DocDigitizer Upload
- Document Reader(Gemini)
- Drag and Drop
- Dropbox
- Dynamic Python
- Email IMAP ReadMon
- Email Read Mon
- Env Check
- Env Var
- Excel2Image
- Excel Advanced
- Excel Advance IV
- Excel AdvII
- Excel AdvIII
- Excel Copy Paste
- Excel Formula
- Excel Large Files
- Excel Macro
- Excel Newfile
- Excel Simple Read
- Excel Simple Write
- Excel Style
- Excel Update
- Fairy Devices mimi AI
- File Conv
- File Downloader
- File Folder Exists
- File Folder Op
- File Status
- Fixed Form Processing
- Floating Form Processing
- Folder Monitor
- Folder Status
- Folder Structure
- FTP Server
- Git HTML Extract
- Google Calendar
- Google Cloud Vision API
- Google Drive
- Google Search API
- Google Sheets
- Google Token
- Google Translate
- Google TTS
- GraphQL API
- Html Extract
- HTML Table
- IBM Speech to Text
- IBM Visual Recognition
- Java UI Automation
- JP Holiday
- JSON Select
- JSON to from CSV
- Lazarus Forms
- Lazarus FTP
- Lazarus Grid
- Lazarus Invoices
- Lazarus RikAI
- Lazarus RikAI2
- Lazarus RikAI2 Async
- Lazarus RikAi2-RAG
- Lazarus Riky
- Lazarus Riky2
- Lazarus VKG
- LINE ID Card OCR
- LINE Notify
- LINE Receipt OCR
- Linkedin API
- Mangdoc AI Docs
- Microsoft Teams
- MongoDB
- MQTT Publisher
- MS Azure Text Analytics
- MS-SQL
- MS Word Extract
- NAVER OCR
- Newuser-SFDC
- OCI
- OCR PreProcess
- OpenAI API
- Oracle2.0 SQL
- Oracle SQL
- Outlook
- Outlook Email
- Outlook E-mail
- PANDAS I
- pandas II
- pandas III
- PANDAS profiling
- Parsehub
- Password Generate
- Path Manipulation
- PDF2Doc
- PDF2Table
- PDF2TXT
- PDF Miner
- PDF Reader(GPT)
- PDF SplitMerge
- PDF Viewer(Start/Stop)
- Pickout AI
- PostgreSQL
- Power Query
- PowerShell
- PPTX Template
- Print 2 Image
- Python Run Script
- Python Selenium
- QR Generate
- QR Read
- RakurakuHanbai API
- Regression
- Rename File
- REST API
- Rossum
- Running GAS
- SAP Hana Cloud
- Scrapy Basic
- Screen Capture
- Screen Recording START
- Screen Recording STOP
- Screen Snipping
- Seaborn Plot
- SharePoint
- Simple Counter
- Simple SFDC
- Slack
- Smart Text Splitter
- Sort CSV
- Speed Test
- SQL
- SQLite
- SSH Command
- SSH Copy
- String Manipulation
- String Similarity
- Svc Check
- Sys Info
- Telegram
- Tesseract
- Text2PDF
- Text2Word
- Text Read
- Text Write
- Tilt Process
- Time Diff
- Time Stamp
- Web Extract
- WhatsApp Send Message
- Windows Op
- Windows Screen Lock
- Win UI Control
- Win UI Text
- Word2PDF
- Word2TXT
- Word Editor
- Work Calendar
- XML Extract
- XML Manipulation
- Xtracta Get Doc
- Xtracta Tracking
- Xtracta Upload
- YouTube Operation
- ZipUnzip