PromptHistory
PromptHistory model for the prompt app.
- class smarter.apps.prompt.models.prompt_history.PromptHistory(*args, **kwargs)[source]
Bases:
TimestampedModelPrompt history model.
- Parameters:
id (Unknown) – Primary key: ID
created_at (Unknown) – Created at
updated_at (Unknown) – Updated at
request (Unknown) – Request
response (Unknown) – Response
messages (Unknown) – Messages
Relationship fields:
- Parameters:
prompt (Unknown) – Prompt (related name:
prompthistory)
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- exception NotUpdated
Bases:
ObjectNotUpdated,DatabaseError
- created_at
-
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
- id
-
Primary key: ID
- Type:
Type
- messages
-
Messages
- Type:
Type
- objects = <django.db.models.Manager object>
- prompt
ForeignKeytoPromptPrompt (related name:
prompthistory)- Type:
Type
- property prompt_history: list[dict]
Used by the Reactapp (via PromptConfigView) to display the prompt history.
- prompt_id
Internal field, use
promptinstead.
- request
-
Request
- Type:
Type
- response
-
Response
- Type:
Type
- updated_at
-
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