PromptToolCall
PromptToolCall model for the prompt app.
- class smarter.apps.prompt.models.prompt_tool_call.PromptToolCall(*args, **kwargs)[source]
Bases:
TimestampedModelPrompt tool call history model.
- Parameters:
id (Unknown) – Primary key: ID
created_at (Unknown) – Created at
updated_at (Unknown) – Updated at
function_name (Unknown) – Function name
function_args (Unknown) – Function args
request (Unknown) – Request
response (Unknown) – Response
Relationship fields:
- Parameters:
prompt (Unknown) – Prompt (related name:
prompttoolcall)plugin (Unknown) – Plugin (related name:
prompttoolcall)
- 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
- function_args
-
Function args
- Type:
Type
- function_name
-
Function name
- Type:
Type
- classmethod get_cached_object(*args, invalidate=False, pk=None, **kwargs)[source]
Get the PromptToolCall instance for the given primary key from the cache.
This method retrieves the PromptToolCall instance associated with the given primary key from the cache. If the instance is not found in the cache, it attempts to retrieve it from the database. If it still cannot be found, it returns
None.- Parameters:
- Returns:
The PromptToolCall instance associated with the given primary key, or
Noneif not found.- Return type:
Optional[PromptToolCall]
- id
-
Primary key: ID
- Type:
Type
- objects = <django.db.models.Manager object>
- plugin
-
Plugin (related name:
prompttoolcall)- Type:
Type
- plugin_id
Internal field, use
plugininstead.
- prompt
ForeignKeytoPromptPrompt (related name:
prompttoolcall)- Type:
Type
- 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