mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-07 07:55:16 +02:00
14 lines
399 B
Python
14 lines
399 B
Python
|
|
"""Format workflow run usage for public API responses."""
|
||
|
|
|
||
|
|
|
||
|
|
def format_public_usage_info(usage_info: dict | None) -> dict | None:
|
||
|
|
if not usage_info:
|
||
|
|
return None
|
||
|
|
|
||
|
|
return {
|
||
|
|
"llm": usage_info.get("llm") or {},
|
||
|
|
"tts": usage_info.get("tts") or {},
|
||
|
|
"stt": usage_info.get("stt") or {},
|
||
|
|
"call_duration_seconds": usage_info.get("call_duration_seconds"),
|
||
|
|
}
|