tencent cloud

Feedback

LLM Summarize Tutorial

Last updated: 2024-12-04 17:16:09

    Free Trial

    1. Open MPS.LIVE, enter the LLM Summarize experience page, select Offline Video (Offline File) or Live Streaming, and click One-Click Processing.
    2. Once the processing is complete, you can view the results.
    
    
    

    API Integration

    Initiating a Summary Task

    Call the Media Processing Service (MPS) API, select AiAnalysisTask, set Definition to 22 (preset large language model (LLM) summarize template), and enter extended parameters in ExtendedParameter for specific capabilities. For details, see Extended Parameter Description below.
    
    
    
    Example:
    {
    "InputInfo": {
    "Type": "URL",
    "UrlInputInfo": {
    "Url": "https://facedetectioncos-1251132611.cos.ap-guangzhou.myqcloud.com/video/test.mp4" // Replace it with the URL of the video to be summarized.
    }
    },
    "AiAnalysisTask": {
    "Definition": 22, //Preset LLM summarize template ID.
    "ExtendedParameter": "{\\"des\\":{\\"need_ocr\\":true,\\"only_segment\\":0,\\"dstlang\\":\\"en\\"}}"
    },
    "OutputStorage": {
    "CosOutputStorage": {
    "Bucket": "test-mps-123456789",
    "Region": "ap-guangzhou-2"
    },
    "Type": "COS"
    },
    "OutputDir": "/output/",
    "TaskNotifyConfig": {
    "NotifyType": "URL",
    "NotifyUrl": "http://qq.com/callback/qtatest/?token=xxxxxx"
    },
    "Action": "ProcessMedia",
    "Version": "2019-06-12"
    }

    API Explorer Quick Verification

    You can perform quick verification through API Explorer. After filling in relevant parameter information on the page, you can initiate an online API call.

    Extended Parameter Description

    ExtendedParameter reference value:
    
    {"des":{"need_ocr":true,"only_segment":0,"text_requirement":"summary within 40 characters","dstlang": "en"}}
    Note:
    API Explorer will automatically convert the format. You only need to enter the corresponding ExtendedParameter in JSON format without converting it to a string. If calling the API directly, you need to escape the JSON string.
    Optional parameters and their descriptions are as follows:
    Parameter
    Required
    Type
    Description
    need_ocr
    No
    bool
    Whether to use Optical Character Recognition (OCR) to assist segmentation, true means enabled. The default value is false.
    If disabled, the system only recognizes the video's speech content to assist in video segmentation; if enabled, it also recognizes the text content on the video image to assist in video segmentation.
    only_segment
    No
    int
    Whether to only segment without generating a summary. The default value is 0.
    1: Only segment without generating a summary.
    0: Segment and generate a summary.
    text_requirement
    No
    string
    Requirements for generating a summary. For example, the character limit is "summary is within 40 characters".
    dstlang
    No
    string
    Title and summary language. The default value is "zh".
    "zh": Chinese.
    "en": English.

    Querying Task Results

    Task callbacks: When initiating an MPS task using ProcessMedia, you can set callback information through the TaskNotifyConfig parameter. After the task is completed, the task results will be called back through the configured callback information. You can parse the event notification results through ParseNotification.
    Use the TaskId returned by ProcessMedia to call the DescribeTaskDetail API to query the task processing results. Parse WorkflowTask > AiAnalysisResultSet > DescriptionTask > Output > DescriptionSet > MediaAiAnalysisDescriptionItem.
    
    
    
    Description corresponds to the entire video summary, and Paragraphs corresponds to the intelligent segmentation results of the entire video and the summary of each segment.
    
    
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support