LangChain
Core
Community
Experimental
exa
google-genai
nvidia-trt
openai
together
robocorp
nvidia-ai-endpoints
anthropic
google-vertexai
mistralai
Partner libs
exa
google-genai
nvidia-trt
openai
together
robocorp
nvidia-ai-endpoints
anthropic
google-vertexai
mistralai
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.