Google OCR

by Zerohertz
Verified

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SAVE_RESULTSNoWhether to save OCR resultsfalse
GOOGLE_APPLICATION_CREDENTIALSYesPath to Google application credentials JSON file

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
ocr
Perform Optical Character Recognition (OCR) on the provided image file. Args: path (str): The absolute file path to the image on which OCR will be performed. Returns: str: The extracted text from the image. Raises: Exception: If an error occurs during the OCR process, it will be logged. Notes: - The function uses Google Cloud Vision API for text detection. - If SAVE_RESULTS is enabled, the OCR results will be saved as a JSON file in the same directory as the input image, with the same name but a .json extension.
ID: 7xv6wlib4l