LangChain
Core
Community
Experimental
nvidia-trt
google-genai
anthropic
together
nvidia-ai-endpoints
mistralai
Partner libs
nvidia-trt
google-genai
anthropic
together
nvidia-ai-endpoints
mistralai
Docs
Toggle Menu
Prev
Up
Next
langchain_core.utils.utils
.convert_to_secret_str
langchain_core.utils.utils
.convert_to_secret_str
¶
langchain_core.utils.utils.
convert_to_secret_str
(
value
:
Union
[
SecretStr
,
str
]
)
→
SecretStr
[source]
¶
Convert a string to a SecretStr if needed.