LangChain
Core
Community
Experimental
robocorp
openai
together
google-genai
nvidia-ai-endpoints
google-vertexai
anthropic
exa
mistralai
nvidia-trt
Partner libs
robocorp
openai
together
google-genai
nvidia-ai-endpoints
google-vertexai
anthropic
exa
mistralai
nvidia-trt
Docs
Toggle Menu
Prev
Up
Next
langchain_core.utils.utils
.convert_to_secret_str
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.