langchain.tools.edenai.ocr_invoiceparser.EdenAiParsingInvoiceTool¶
class langchain.tools.edenai.ocr_invoiceparser.EdenAiParsingInvoiceTool[source]¶
Bases: EdenaiTool
Tool that queries the Eden AI Invoice parsing API.
for api reference check edenai documentation:
https://docs.edenai.co/reference/ocr_invoice_parser_create.
To use, you should have
the environment variable EDENAI_API_KEY set with your API token.
You can find your token here: https://app.edenai.run/admin/account/settings
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
param args_schema: Optional[Type[BaseModel]] = None¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param description: str = 'A wrapper around edenai Services invoice parsing. Useful for when you have to extract information from \n        an image it enables to take invoices \n        in a variety of formats and returns the data in contains\n        (items, prices, addresses, vendor name, etc.)\n        in a structured format to automate the invoice processing Input should be the string url of the document to parse.'¶
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
param edenai_api_key: Optional[str] = None¶
param feature: str = 'ocr'¶
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶