Files
letta-server/letta/schemas/enums.py
mlong93 a70fbca219 feat: Add ConditionalToolRules (#2279)
Co-authored-by: Mindy Long <mindy@letta.com>
2024-12-19 14:54:21 -08:00

51 lines
1.0 KiB
Python

from enum import Enum
class MessageRole(str, Enum):
assistant = "assistant"
user = "user"
tool = "tool"
function = "function"
system = "system"
class OptionState(str, Enum):
"""Useful for kwargs that are bool + default option"""
YES = "yes"
NO = "no"
DEFAULT = "default"
class JobStatus(str, Enum):
"""
Status of the job.
"""
created = "created"
running = "running"
completed = "completed"
failed = "failed"
pending = "pending"
class MessageStreamStatus(str, Enum):
done_generation = "[DONE_GEN]"
done_step = "[DONE_STEP]"
done = "[DONE]"
class ToolRuleType(str, Enum):
"""
Type of tool rule.
"""
# note: some of these should be renamed when we do the data migration
run_first = "InitToolRule"
exit_loop = "TerminalToolRule" # reasoning loop should exit
continue_loop = "continue_loop" # reasoning loop should continue
conditional = "conditional"
constrain_child_tools = "ToolRule"
require_parent_tools = "require_parent_tools"