# utils

> **Module** in `langsmith`

📖 [View in docs](https://reference.langchain.com/python/langsmith/utils)

Generic utility functions.

## Properties

- `T`
- `P`

## Methods

- [`get_invalid_prompt_identifier_msg()`](https://reference.langchain.com/python/langsmith/utils/get_invalid_prompt_identifier_msg)
- [`tracing_is_enabled()`](https://reference.langchain.com/python/langsmith/utils/tracing_is_enabled)
- [`test_tracking_is_disabled()`](https://reference.langchain.com/python/langsmith/utils/test_tracking_is_disabled)
- [`xor_args()`](https://reference.langchain.com/python/langsmith/utils/xor_args)
- [`raise_for_status_with_text()`](https://reference.langchain.com/python/langsmith/utils/raise_for_status_with_text)
- [`get_enum_value()`](https://reference.langchain.com/python/langsmith/utils/get_enum_value)
- [`log_once()`](https://reference.langchain.com/python/langsmith/utils/log_once)
- [`get_messages_from_inputs()`](https://reference.langchain.com/python/langsmith/utils/get_messages_from_inputs)
- [`get_message_generation_from_outputs()`](https://reference.langchain.com/python/langsmith/utils/get_message_generation_from_outputs)
- [`get_prompt_from_inputs()`](https://reference.langchain.com/python/langsmith/utils/get_prompt_from_inputs)
- [`get_llm_generation_from_outputs()`](https://reference.langchain.com/python/langsmith/utils/get_llm_generation_from_outputs)
- [`get_docker_compose_command()`](https://reference.langchain.com/python/langsmith/utils/get_docker_compose_command)
- [`convert_langchain_message()`](https://reference.langchain.com/python/langsmith/utils/convert_langchain_message)
- [`is_base_message_like()`](https://reference.langchain.com/python/langsmith/utils/is_base_message_like)
- [`is_env_var_truish()`](https://reference.langchain.com/python/langsmith/utils/is_env_var_truish)
- [`get_env_var()`](https://reference.langchain.com/python/langsmith/utils/get_env_var)
- [`get_tracer_project()`](https://reference.langchain.com/python/langsmith/utils/get_tracer_project)
- [`filter_logs()`](https://reference.langchain.com/python/langsmith/utils/filter_logs)
- [`get_cache_dir()`](https://reference.langchain.com/python/langsmith/utils/get_cache_dir)
- [`filter_request_headers()`](https://reference.langchain.com/python/langsmith/utils/filter_request_headers)
- [`with_cache()`](https://reference.langchain.com/python/langsmith/utils/with_cache)
- [`with_optional_cache()`](https://reference.langchain.com/python/langsmith/utils/with_optional_cache)
- [`deepish_copy()`](https://reference.langchain.com/python/langsmith/utils/deepish_copy)
- [`is_version_greater_or_equal()`](https://reference.langchain.com/python/langsmith/utils/is_version_greater_or_equal)
- [`parse_prompt_identifier()`](https://reference.langchain.com/python/langsmith/utils/parse_prompt_identifier)
- [`get_api_url()`](https://reference.langchain.com/python/langsmith/utils/get_api_url)
- [`get_api_key()`](https://reference.langchain.com/python/langsmith/utils/get_api_key)
- [`get_workspace_id()`](https://reference.langchain.com/python/langsmith/utils/get_workspace_id)
- [`get_host_url()`](https://reference.langchain.com/python/langsmith/utils/get_host_url)
- [`is_truish()`](https://reference.langchain.com/python/langsmith/utils/is_truish)

---

[View source on GitHub](https://github.com/langchain-ai/langsmith-sdk/blob/cc54cc2729bb1cfe402fd9f34cf953de60bde30c/python/langsmith/utils.py)