LLM Core API
API for calling LLM Core(s)
Setting Up the LLM Layer
The SDK provides a streamlined way to configure and initialize LLM components through the add_llm_layer
method:
This method handles the LLM setup by sending the configuration to the /core/llm/setup
endpoint, which is processed by the kernel.
LLM Configuration
The LLMLayer
class defines the configuration parameters for the LLM:
Note: Both llm_name
and llm_backend
are required parameters for all model types (open-source and closed-source). And close-sourced models can set up the GPU configurations by passing the max_gpu_memory
to load the LLM and the eval_device
to do specific inference.
Interacting with the LLM
Query Format
Interactions with the LLM require constructing a LLMQuery
object:
Response Format
The LLM's response follows the Response
class structure:
Last updated