utilities.bash.BashProcess([strip_newlines, ...])
Wrapper class for starting subprocesses.
utilities.graphql.GraphQLAPIWrapper
Wrapper around GraphQL API.
Functions¶
utilities.loading.try_load_from_hub(path, ...)
Load configuration from hub.
utilities.powerbi.fix_table_name(table)
Add single quotes around table names that contain spaces.
utilities.powerbi.json_to_md(json_contents)
Converts a JSON object to a markdown table.
utilities.redis.get_client(redis_url, **kwargs)
Get a redis client from the connection url given.
utilities.sql_database.truncate_word(...[, ...])
Truncate a string to a certain number of words, based on the max string length.
utilities.vertexai.init_vertexai([project, ...])
Init vertexai.
utilities.vertexai.raise_vertex_import_error([...])
Raise ImportError related to Vertex SDK being not available.
langchain.utils¶
Utility functions for LangChain.
These functions do not depend on any other LangChain module.
Classes¶
utils.formatting.StrictFormatter()
A subclass of formatter that checks for extra keys.
Functions¶
utils.env.get_from_dict_or_env(data, key, ...)
Get a value from a dictionary or an environment variable.
utils.env.get_from_env(key, env_key[, default])
Get a value from a dictionary or an environment variable.
utils.input.get_bolded_text(text)
Get bolded text.
utils.input.get_color_mapping(items[, ...])
Get mapping for items to a support color.
utils.input.get_colored_text(text, color)
Get colored text.
utils.input.print_text(text[, color, end, file])
Print text with highlighting and no end characters.
utils.math.cosine_similarity(X, Y)
Row-wise cosine similarity between two equal-width matrices.