LLMClientExtensions Model

class smarter.apps.llmclient.models.LLMClientExtensions(*args, **kwargs)[source]

Bases: TimestampedModel

The Extensions whose tools a LLMClient offers the LLM.

Each record links an LLMClient to an Extension, as listed, by slug, in the LLMClient manifest’s spec.extensions. On each prompt, the tools of the linked extensions that are enabled, and available to the LLMClient’s account, are offered to the LLM.

Usage Example

LLMClientExtensions.objects.create(llmclient=my_llmclient, extension=weather)
extensions = LLMClientExtensions.extensions_for(my_llmclient)
Parameters:
  • id (Unknown) – Primary key: ID

  • created_at (Unknown) – Created at

  • updated_at (Unknown) – Updated at

Relationship fields:

Parameters:
  • llmclient (Unknown) – Llmclient (related name: llmclientextensions)

  • extension (Unknown) – Extension. The Extension. (related name: llmclient_extensions)

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

created_at

DateTimeField

Created at

Timestamp indicating when the model instance was created.

This field is automatically set to the current date and time when the instance is first created. It is indexed in the database for efficient querying.

Type:

Type

extension

ForeignKey to Extension

Extension. The Extension. (related name: llmclient_extensions)

Type:

Type

extension_id

Internal field, use extension instead.

classmethod extensions_for(llmclient)[source]

Return the extensions of a LLMClient, in order of slug, with their installed versions.

The versions’ archives are not fetched: load_version() reads one only the first time a process loads it.

Parameters:

llmclient (LLMClient) – The LLMClient.

Returns:

The LLMClient’s extensions, enabled or not.

Return type:

list[Extension]

id

BigAutoField

Primary key: ID

Type:

Type

llmclient

ForeignKey to LLMClient

Llmclient (related name: llmclientextensions)

Type:

Type

llmclient_id

Internal field, use llmclient instead.

objects = <django.db.models.Manager object>
updated_at

DateTimeField

Updated at

Timestamp indicating when the model instance was last updated.

This field is automatically updated to the current date and time whenever the instance is saved. It is indexed in the database for efficient querying.

Type:

Type