Prompt

Prompt model for the prompt app.

class smarter.apps.prompt.models.prompt.Prompt(*args, **kwargs)[source]

Bases: MetaDataWithOwnershipModel

Prompt model.

Parameters:
  • id (Unknown) – Primary key: ID

  • created_at (Unknown) – Created at

  • updated_at (Unknown) – Updated at

  • name (Unknown) – Name. Name in camelCase, e.g., ‘apiKey’, no special characters.

  • description (Unknown) – Description. A brief description of this resource. Be verbose, but not too verbose.

  • version (Unknown) – Version. Semantic version in the format MAJOR.MINOR.PATCH, e.g., ‘1.0.0’.

  • annotations (Unknown) – Annotations. Key-value pairs for annotating this resource.

  • session_key (Unknown) – Session key

  • ip_address (Unknown) – Ip address

  • user_agent (Unknown) – User agent

  • url (Unknown) – Url

Relationship fields:

Parameters:
  • user_profile (Unknown) – User profile (related name: prompt)

  • llmclient (Unknown) – Llmclient (related name: prompt)

  • tags (Unknown) – Tags. Tags for categorizing and organizing this resource. (related name: prompt)

  • tagged_items (Unknown) – Tagged items (related name: +)

Reverse relationships:

Parameters:
  • orchestration_steps (Unknown) – All orchestration steps of this prompt (related name of prompt)

  • prompthistory (Unknown) – All Prompt History of this prompt (related name of prompt)

  • promptpluginusage (Unknown) – All Prompt Plugin Usage of this prompt (related name of prompt)

  • prompttoolcall (Unknown) – All Prompt Tool Call History of this prompt (related name of prompt)

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

annotations

JSONField

Annotations. Key-value pairs for annotating this resource.

Type:

Type

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

delete(*args, **kwargs)[source]
description

TextField

Description. A brief description of this resource. Be verbose, but not too verbose.

Type:

Type

id

BigAutoField

Primary key: ID

Type:

Type

ip_address

GenericIPAddressField

Ip address

Type:

Type

property is_billable_resource: bool

Indicates whether the model instance is considered a billable resource.

This property can be overridden in subclasses to specify which models are billable. By default, it returns False, indicating that the base TimestampedModel is not billable.

Returns:

True if the instance is billable, False otherwise.

Return type:

bool

llmclient

ForeignKey to LLMClient

Llmclient (related name: prompt)

Type:

Type

llmclient_id

Internal field, use llmclient instead.

name

CharField

Name. Name in camelCase, e.g., ‘apiKey’, no special characters.

Type:

Type

objects: MetaDataWithOwnershipModelManager = <smarter.apps.account.models.metadata_with_ownership.MetaDataWithOwnershipModelManager object>
orchestration_steps

Reverse ForeignKey from OrchestrationStep

All orchestration steps of this prompt (related name of prompt)

Type:

Type

prompthistory_set

Reverse ForeignKey from PromptHistory

All Prompt History of this prompt (related name of prompt)

Type:

Type

promptpluginusage_set

Reverse ForeignKey from PromptPluginUsage

All Prompt Plugin Usage of this prompt (related name of prompt)

Type:

Type

prompttoolcall_set

Reverse ForeignKey from PromptToolCall

All Prompt Tool Call History of this prompt (related name of prompt)

Type:

Type

session_key

CharField

Session key

Type:

Type

tagged_items

Reverse GenericRelation from Prompt

All + of this tagged item (related name of tagged_items)

Type:

Type

tags = <taggit.managers._TaggableManager 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

url

URLField

Url

Type:

Type

user_agent

CharField

User agent

Type:

Type

user_profile

ForeignKey to UserProfile

User profile (related name: prompt)

Type:

Type

user_profile_id

Internal field, use user_profile instead.

version

CharField

Version. Semantic version in the format MAJOR.MINOR.PATCH, e.g., ‘1.0.0’.

Type:

Type