MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / _content_text

Function _content_text

uncommon_route/proxy.py:364–373  ·  view source on GitHub ↗
(value: Any)

Source from the content-addressed store, hash-verified

362
363
364def _content_text(value: Any) -> str:
365 if isinstance(value, str):
366 return value
367 if isinstance(value, list):
368 parts: list[str] = []
369 for item in value:
370 if isinstance(item, dict) and item.get("type") in {"text", "input_text"}:
371 parts.append(str(item.get("text", "")))
372 return "\n".join(part for part in parts if part)
373 return str(value or "")
374
375
376def _looks_like_wrapper_text(text: str) -> bool:

Calls 2

getMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected