2.17 LLM

Read(6) Label: llmcli,

1. The path of LLMCli external library is installation directory\esProc\extlib\LLMCli. The Raqsoft core jar for this external library is scu-chat-model-2.0.1.jar.

annotations-13.0.jar

jackson-annotations-2.15.2.jar

jackson-core-2.15.2.jar

jackson-databind-2.15.2.jar

kotlin-stdlib-1.8.21.jar

kotlin-stdlib-common-1.9.10.jar

kotlin-stdlib-jdk8-1.8.21.jar

okhttp3-sse-4.12.0.jar

okhttp-4.12.0.jar

okio-3.6.0.jar

okio-jvm-3.6.0.jar

There are two files in the directory containing the necessary third-party jars:

chat.db

config.json

chat.db stores searching records. Each query and its search result is stored in this file.

config.json has the following items:

{

  "api_host":"https://……",  //API address

  "api_key":"sk_*****",  //API password

  "model_name":"***",  //Model name

  "connect_timeout": 120,  // Connection timeout (unit: millisecond)

  "read_timeout": 120,  // Response timeout (unit: millisecond)

  "temperature": 0.7,  // Controlled randomness/creativity, whose value range is  0.0 (predictable) ~ 1.0 (unpredictable).

  "top_p": 0.9,  // Control the range of candidate words, which is 0.1(narrow) ~ 1.0 (wide).

  "max_tokens": 512,  //The maximum length of the model’s generated single response, controlling the maximum number of tokens it can output.

  "think": true,  // Whether to display the thinking process or not.

  "max_multi_turn_dial_size": 7,  //The number of rounds of dialogues allowed to be retained.

  "system_prompt": " You are a professional Scudata SPL language AI Q&A assistant. Distinct from other languages such as Python, C++, JavaScript, VBS, etc., please refer to SPL language-related materials and provide factual responses."  // Set the role and tasks for the model to determine the tone and scope of the responses.

}

Note:

(1) The above fiels are encapsulated in the external library compression package and users can choose appropriate ones for specific scenarios.

(2) If a database connection error occurs during the execution, download the more suitable edition’s sqlite-jdbc.jar and put it in [installation directory]\common\jdbc.

 

2. A JRE version 1.7 or above is required. Users need to install a higher version if the esProc built-in JRE version does not meet the requirements, and then configure java_home in config.txt under installation directory\esProc\bin. Just skip this step if the JRE version is adequate.

 

3. Users can change the size of memory if the default size isn’t large enough to meet the needs. Under Windows, make the change in config.txt when starting esProc through .exe file; and in .bat file when starting the application through the .bat file. Make the modification in .sh file under Linux.

To modify the config.txt file under Windows:

java_home=C:\ProgramFiles\Java\jdk1.7.0_11;esproc_port=48773;btx_port=41735;gtm_port=41737;jvm_args=-Xms256m-XX:PermSize=256M-XX:MaxPermSize=512M-Xmx9783m-Duser.language=zh

4. esProc provides functions llm_open(), llm_chat(), and llm_close() to access LLMCli. Look them up in Help-Function referenceto find their uses.