Workflow Copilot: backend side of the first version (#4401)
This commit is contained in:
committed by
GitHub
parent
1e314ce149
commit
e3dd75d7c1
@@ -69,6 +69,8 @@ WORKFLOW_RUN_PREFIX = "wr"
|
||||
WORKFLOW_SCRIPT_PREFIX = "ws"
|
||||
WORKFLOW_TEMPLATE_PREFIX = "wt"
|
||||
ORGANIZATION_BILLING_PREFIX = "ob"
|
||||
WORKFLOW_COPILOT_CHAT_PREFIX = "wcc"
|
||||
WORKFLOW_COPILOT_CHAT_MESSAGE_PREFIX = "wccm"
|
||||
|
||||
|
||||
def generate_workflow_id() -> str:
|
||||
@@ -266,6 +268,16 @@ def generate_billing_id() -> str:
|
||||
return f"{ORGANIZATION_BILLING_PREFIX}_{int_id}"
|
||||
|
||||
|
||||
def generate_workflow_copilot_chat_id() -> str:
|
||||
int_id = generate_id()
|
||||
return f"{WORKFLOW_COPILOT_CHAT_PREFIX}_{int_id}"
|
||||
|
||||
|
||||
def generate_workflow_copilot_chat_message_id() -> str:
|
||||
int_id = generate_id()
|
||||
return f"{WORKFLOW_COPILOT_CHAT_MESSAGE_PREFIX}_{int_id}"
|
||||
|
||||
|
||||
############# Helper functions below ##############
|
||||
def generate_id() -> int:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user