class documentation

LLM config

Static Method provider_name Return the name of the LLM provider given its ID.
Static Method providers Return a list of available LLM providers.
Method __init__ Initialize the LLM config for the given provider ID.
Class Variable __slots__ Undocumented
Property api_key Return the current API key.
Property headers Return the headers for the LLM.
Property id Return the ID of the LLM.
Property model Return the current model.
Property models Return the list of models for the LLM.
Property name Return the name of the LLM.
Property payload Return a payload for the chat agent based on the provider.
Property thinking Return the current thinking setting for the LLM.
Property thinking_payload Return the thinking-related payload for the LLM.
Property url Return the URL of the LLM.
Method __set Set model name, url, and headers based on the provider ID.
Instance Variable _api_key Undocumented
Instance Variable _current_model Undocumented
Instance Variable _headers Undocumented
Instance Variable _id Undocumented
Instance Variable _models Undocumented
Instance Variable _name Undocumented
Instance Variable _thinking Undocumented
Instance Variable _url Undocumented
@staticmethod
def provider_name(provider_id: int) -> str:

Return the name of the LLM provider given its ID.

Parameters
provider_id:intThe provider ID constant.
Returns
strThe provider name, or "Unknown" if not recognized.
@staticmethod
def providers() -> list:

Return a list of available LLM providers.

def __init__(self, storage, llm_id: int, model: str = None, thinking: str = 'none'):

Initialize the LLM config for the given provider ID.

Parameters
storage:StorageThe storage interface for settings.
llm_id:intThe provider ID constant.
model:strThe model name to use. Defaults to None.
thinking:strThe thinking level. Defaults to "none".
__slots__: list[str] =

Undocumented

@property
api_key: str =

Return the current API key.

@property
headers: dict =

Return the headers for the LLM.

@property
id: int =

Return the ID of the LLM.

@property
model: str =

Return the current model.

@property
models: list =

Return the list of models for the LLM.

@property
name: str =

Return the name of the LLM.

@property
payload: dict =

Return a payload for the chat agent based on the provider.

@property
thinking: str =

Return the current thinking setting for the LLM.

@property
thinking_payload: dict =

Return the thinking-related payload for the LLM.

@property
url: str =

Return the URL of the LLM.

def __set(self, storage):

Set model name, url, and headers based on the provider ID.

Parameters
storage:StorageThe storage interface for settings.
_api_key =

Undocumented

_current_model =

Undocumented

_headers: dict[str, str] =

Undocumented

_id =

Undocumented

_models: list[str] =

Undocumented

_name: str =

Undocumented

_thinking: str =

Undocumented

_url: str =

Undocumented