MCPcopy
hub / github.com/openai/openai-python / _normalize_optional_string

Function _normalize_optional_string

src/openai/providers/bedrock.py:28–33  ·  view source on GitHub ↗
(value: str | None)

Source from the content-addressed store, hash-verified

26
27
28def _normalize_optional_string(value: str | None) -> str | None:
29 if value is None:
30 return None
31
32 normalized = value.strip()
33 return normalized or None
34
35
36def _normalize_base_url(base_url: str | httpx.URL) -> httpx.URL:

Callers 1

bedrockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected