add permanent_workflow_id to observer_cruises and observer_thoughts (#1396)
This commit is contained in:
@@ -1793,6 +1793,7 @@ class AgentDB:
|
||||
self,
|
||||
workflow_run_id: str | None = None,
|
||||
workflow_id: str | None = None,
|
||||
workflow_permanent_id: str | None = None,
|
||||
prompt: str | None = None,
|
||||
url: str | None = None,
|
||||
organization_id: str | None = None,
|
||||
@@ -1801,6 +1802,7 @@ class AgentDB:
|
||||
new_observer_cruise = ObserverCruiseModel(
|
||||
workflow_run_id=workflow_run_id,
|
||||
workflow_id=workflow_id,
|
||||
workflow_permanent_id=workflow_permanent_id,
|
||||
prompt=prompt,
|
||||
url=url,
|
||||
organization_id=organization_id,
|
||||
@@ -1815,6 +1817,7 @@ class AgentDB:
|
||||
observer_cruise_id: str,
|
||||
workflow_run_id: str | None = None,
|
||||
workflow_id: str | None = None,
|
||||
workflow_permanent_id: str | None = None,
|
||||
workflow_run_block_id: str | None = None,
|
||||
user_input: str | None = None,
|
||||
observation: str | None = None,
|
||||
@@ -1827,6 +1830,7 @@ class AgentDB:
|
||||
observer_cruise_id=observer_cruise_id,
|
||||
workflow_run_id=workflow_run_id,
|
||||
workflow_id=workflow_id,
|
||||
workflow_permanent_id=workflow_permanent_id,
|
||||
workflow_run_block_id=workflow_run_block_id,
|
||||
user_input=user_input,
|
||||
observation=observation,
|
||||
@@ -1845,6 +1849,7 @@ class AgentDB:
|
||||
status: ObserverCruiseStatus | None = None,
|
||||
workflow_run_id: str | None = None,
|
||||
workflow_id: str | None = None,
|
||||
workflow_permanent_id: str | None = None,
|
||||
url: str | None = None,
|
||||
prompt: str | None = None,
|
||||
organization_id: str | None = None,
|
||||
@@ -1864,6 +1869,8 @@ class AgentDB:
|
||||
observer_cruise.workflow_run_id = workflow_run_id
|
||||
if workflow_id:
|
||||
observer_cruise.workflow_id = workflow_id
|
||||
if workflow_permanent_id:
|
||||
observer_cruise.workflow_permanent_id = workflow_permanent_id
|
||||
if url:
|
||||
observer_cruise.url = url
|
||||
if prompt:
|
||||
|
||||
@@ -515,6 +515,7 @@ class ObserverCruiseModel(Base):
|
||||
organization_id = Column(String, ForeignKey("organizations.organization_id"), nullable=True)
|
||||
workflow_run_id = Column(String, ForeignKey("workflow_runs.workflow_run_id"), nullable=True)
|
||||
workflow_id = Column(String, ForeignKey("workflows.workflow_id"), nullable=True)
|
||||
workflow_permanent_id = Column(String, nullable=True)
|
||||
prompt = Column(UnicodeText, nullable=True)
|
||||
url = Column(String, nullable=True)
|
||||
|
||||
@@ -531,6 +532,7 @@ class ObserverThoughtModel(Base):
|
||||
workflow_run_id = Column(String, ForeignKey("workflow_runs.workflow_run_id"), nullable=True)
|
||||
workflow_run_block_id = Column(String, ForeignKey("workflow_run_blocks.workflow_run_block_id"), nullable=True)
|
||||
workflow_id = Column(String, ForeignKey("workflows.workflow_id"), nullable=True)
|
||||
workflow_permanent_id = Column(String, nullable=True)
|
||||
user_input = Column(UnicodeText, nullable=True)
|
||||
observation = Column(String, nullable=True)
|
||||
thought = Column(String, nullable=True)
|
||||
|
||||
@@ -23,6 +23,7 @@ class ObserverCruise(BaseModel):
|
||||
organization_id: str | None = None
|
||||
workflow_run_id: str | None = None
|
||||
workflow_id: str | None = None
|
||||
workflow_permanent_id: str | None = None
|
||||
prompt: str | None = None
|
||||
url: HttpUrl | None = None
|
||||
|
||||
@@ -39,6 +40,7 @@ class ObserverThought(BaseModel):
|
||||
workflow_run_id: str | None = None
|
||||
workflow_run_block_id: str | None = None
|
||||
workflow_id: str | None = None
|
||||
workflow_permanent_id: str | None = None
|
||||
user_input: str | None = None
|
||||
observation: str | None = None
|
||||
thought: str | None = None
|
||||
|
||||
Reference in New Issue
Block a user