mirror of
https://github.com/cpacker/MemGPT.git
synced 2025-06-03 04:30:22 +00:00

Co-authored-by: cthomas <caren@letta.com> Co-authored-by: Sarah Wooders <sarahwooders@gmail.com> Co-authored-by: Kevin Lin <klin5061@gmail.com> Co-authored-by: Shubham Naik <shub@letta.com> Co-authored-by: Shubham Naik <shub@memgpt.ai> Co-authored-by: Charles Packer <packercharles@gmail.com> Co-authored-by: Shubham Naik <shubham.naik10@gmail.com> Co-authored-by: mlong93 <35275280+mlong93@users.noreply.github.com> Co-authored-by: Mindy Long <mindy@letta.com> Co-authored-by: Stephan Fitzpatrick <stephan@knowsuchagency.com> Co-authored-by: dboyliao <qmalliao@gmail.com> Co-authored-by: Jyotirmaya Mahanta <jyotirmaya.mahanta@gmail.com> Co-authored-by: Nicholas <102550462+ndisalvio3@users.noreply.github.com> Co-authored-by: tarunkumark <tkksctwo@gmail.com> Co-authored-by: Miao <one.lemorage@gmail.com> Co-authored-by: Krishnakumar R (KK) <65895020+kk-src@users.noreply.github.com> Co-authored-by: Will Sargent <will.sargent@gmail.com>
34 lines
2.2 KiB
Python
34 lines
2.2 KiB
Python
from typing import Dict, List, Optional
|
|
|
|
from pydantic import Field
|
|
|
|
from letta.schemas.letta_base import LettaBase
|
|
from letta.schemas.message import Message
|
|
|
|
|
|
class StepBase(LettaBase):
|
|
__id_prefix__ = "step"
|
|
|
|
|
|
class Step(StepBase):
|
|
id: str = Field(..., description="The id of the step. Assigned by the database.")
|
|
origin: Optional[str] = Field(None, description="The surface that this agent step was initiated from.")
|
|
organization_id: Optional[str] = Field(None, description="The unique identifier of the organization associated with the step.")
|
|
provider_id: Optional[str] = Field(None, description="The unique identifier of the provider that was configured for this step")
|
|
job_id: Optional[str] = Field(
|
|
None, description="The unique identifier of the job that this step belongs to. Only included for async calls."
|
|
)
|
|
agent_id: Optional[str] = Field(None, description="The ID of the agent that performed the step.")
|
|
provider_name: Optional[str] = Field(None, description="The name of the provider used for this step.")
|
|
model: Optional[str] = Field(None, description="The name of the model used for this step.")
|
|
model_endpoint: Optional[str] = Field(None, description="The model endpoint url used for this step.")
|
|
context_window_limit: Optional[int] = Field(None, description="The context window limit configured for this step.")
|
|
completion_tokens: Optional[int] = Field(None, description="The number of tokens generated by the agent during this step.")
|
|
prompt_tokens: Optional[int] = Field(None, description="The number of tokens in the prompt during this step.")
|
|
total_tokens: Optional[int] = Field(None, description="The total number of tokens processed by the agent during this step.")
|
|
completion_tokens_details: Optional[Dict] = Field(None, description="Metadata for the agent.")
|
|
tags: List[str] = Field([], description="Metadata tags.")
|
|
tid: Optional[str] = Field(None, description="The unique identifier of the transaction that processed this step.")
|
|
trace_id: Optional[str] = Field(None, description="The trace id of the agent step.")
|
|
messages: List[Message] = Field([], description="The messages generated during this step.")
|