Share this page

# LLM protocol

The LLM (large language model) protocol lets you create scripts for testing LLMs, such as OpenAI and Gemini.

Note: The LLM protocol is available from version 25.3.

In this topic:

## Create an LLM test

LLM scripts contain standard Web-HTTP/HTML functions with additional calls to custom LLM calls, such as llm_request.

Currently, only non-streaming AI is supported.

To create a script:

1. In VuGen, create a new script of the type LLM (Large Language Model).

2. Add the relevant functions as described in the Function Reference and the examples below.

## Examples

The following example illustrates a script with an LLM request for OpenAI.

Copy code

    web_add_header("Content-Type","application/json");
    web_add_header("Authorization","<API_KEY>");
    llm_request("OpenAI_Chat_Completion",
        "URL=https://api.openai.com/v1/chat/completions",
        "AIModel=openai",
        lr_eval_string("{request_body}"),
        LAST);
    return 0;

The following example illustrates a script with an LLM request for Gemini.

Copy code

    lr_param_sprintf ("request_body", "Body={ \"contents\":[ { \"parts\":[{\"text\": \"hello?\"}]} ] }");
    web_add_header("Content-Type","application/json");
    llm_request("Gemini_Chat_Completion",
         "URL=https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=<API_KEY> ",
         "AIModel=gemini",
          lr_eval_string("{request_body}"),
          LAST);

Back to top

See also:

- llm_request function
- Function Reference
- Web - HTTP/HTML protocol
- Protocols

https://admhelp.microfocus.com VuGen,Professional Performance Engineering,Performance Engineering for Developers 8942
Tips to improve your search results... OpenText™ Virtual User Generator Help Center OpenText™ VuGen Help 25.1-25.3 All View Local Help Center View Online Help Center Version: