AnyLlmUploadWebLink

Uploads a web link as a LLM document. Does not currently support full text search.

python · Anything LLM

Details

IDAnyLlmUploadWebLink
Languagepython
From Version6.10.0
Docker Imagedemisto/python3:3.12.8.3296088

README

Uploads a web link as a LLM document. Does not currently support full text search.

Script Data


Name Description
Script Type python3

Inputs


Argument Name Description
link web link to upload as LLM document
title title of the LLM document
author author of the LLM document
description description of the LLM document
source source of the LLM document

Outputs


There are no outputs for this script.

import demistomock as demisto  # noqa: F401
from CommonServerPython import *  # noqa: F401


def main():
    try:
        args = demisto.args()
        cargs = {
            "link": args.get("link", ""),
            "title": args.get("title", ""),
            "author": args.get("author", ""),
            "description": args.get("description", ""),
            "source": args.get("source", ""),
        }
        if cargs["title"] == "" or cargs["link"] == "":
            raise Exception("The title or link parameter was not provided")
        execute_command("anyllm-document-upload-link", cargs)
        execute_command("AnyLlmDocuments", {"customFields": {"documentsfield": "anythingllmdocuments"}})
    except Exception as ex:
        demisto.error(traceback.format_exc())
        return_error(f"AnyLlmUploadWebLink: error - {ex}")


if __name__ in ("__main__", "__builtin__", "builtins"):
    main()