mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-12 17:22:38 +02:00
26 lines
482 B
Python
26 lines
482 B
Python
|
|
"""Prefixed UUID generators for stream parts."""
|
||
|
|
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
import uuid
|
||
|
|
|
||
|
|
|
||
|
|
def generate_message_id() -> str:
|
||
|
|
return f"msg_{uuid.uuid4().hex}"
|
||
|
|
|
||
|
|
|
||
|
|
def generate_text_id() -> str:
|
||
|
|
return f"text_{uuid.uuid4().hex}"
|
||
|
|
|
||
|
|
|
||
|
|
def generate_reasoning_id() -> str:
|
||
|
|
return f"reasoning_{uuid.uuid4().hex}"
|
||
|
|
|
||
|
|
|
||
|
|
def generate_tool_call_id() -> str:
|
||
|
|
return f"call_{uuid.uuid4().hex}"
|
||
|
|
|
||
|
|
|
||
|
|
def generate_subagent_run_id() -> str:
|
||
|
|
return f"subagent_{uuid.uuid4().hex}"
|