Description:
Connect to LLM model.
Syntax:
llm_open([apiHost], [apiKey],[modelName];[stream])
Note:
LLMCli external library function (See External Library Guide).
The function connects to a LLM model. The parameter settings will first use the existing ones stored in the script file, which, by default, refers to the configuration file config.json.
Parameter:
|
apiHost |
API address. |
|
apiKey |
API password. |
|
modelName |
Model name. |
|
stream |
Specify whether to use the stream mode or not. “true” represents stream mode, which enables to output console information in real-time during script execution. By default, the parameter value is false representing the non-stream mode, which enable outputting all console information at a time after the script execution is finished. |
Return value:
LLM connection object
Example:
|
|
A |
|
|
1 |
=llm_open("http://localhost:11434/api/chat","sk_adfsdfdf", "deepseek-r1:1.5b") |
Connect to Deepseek model through the non-stream mode. |
|
2 |
=llm_open(,,"deepseek-r1:1.5b";true) |
Connect to Deepseek model through the stream mode, and use parameter settings configured in config.json. |
|
3 |
=llm_open() |
Connect to Deepseek model through the non-stream mode, and use parameter settings configured in config.json. |