MCPcopy Create free account
hub / github.com/OpenRouterTeam/python-sdk / _val_to_string

Function _val_to_string

src/openrouter/utils/values.py:113–121  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

111
112
113def _val_to_string(val) -> str:
114 if isinstance(val, bool):
115 return str(val).lower()
116 if isinstance(val, datetime):
117 return str(val.isoformat().replace("+00:00", "Z"))
118 if isinstance(val, Enum):
119 return str(val.value)
120
121 return str(val)
122
123
124def _get_serialized_params(

Calls

no outgoing calls

Tested by

no test coverage detected