LangChain auto-generated ID prefix for messages and content blocks.
Internal tracing/callback system identifier.
Used for:
Check if the given class is Pydantic v1-like.
Validate specified keyword args are mutually exclusive.
Raise an error with the response text.
Context manager for mocking out datetime.now() in unit tests.
Dynamically import a module.
Raise an exception if the module is not installed.
Check the version of a package.
Get field names, including aliases, for a pydantic class.
Build extra kwargs from values and extra_kwargs.
Kept for backwards-compatibility but should never have been public. Use the
internal _build_model_kwargs function instead.
Convert a string to a SecretStr if needed.
Create a factory method that gets a value from an environment variable.
Secret from env.
Ensure the ID is a valid string, generating a new UUID if not provided.
Auto-generated UUIDs are prefixed by 'lc_' to indicate they are
LangChain-generated IDs.