callbacks.flyte_callback.import_flytekit()
Import flytekit and flytekitplugins-deck-standard.
callbacks.infino_callback.get_num_tokens(...)
Calculate num tokens for OpenAI with tiktoken package.
callbacks.infino_callback.import_infino()
Import the infino client.
callbacks.infino_callback.import_tiktoken()
Import tiktoken for counting tokens for OpenAI models.
callbacks.labelstudio_callback.get_default_label_configs(mode)
Get default Label Studio configs for the given mode.
callbacks.llmonitor_callback.identify(user_id)
Builds an LLMonitor UserContextManager
callbacks.manager.get_openai_callback()
Get the OpenAI callback handler in a context manager.
callbacks.manager.wandb_tracing_enabled([...])
Get the WandbTracer in a context manager.
callbacks.mlflow_callback.analyze_text(text)
Analyze text using textstat and spacy.
callbacks.mlflow_callback.construct_html_from_prompt_and_generation(...)
Construct an html element from a prompt and a generation.
callbacks.mlflow_callback.import_mlflow()
Import the mlflow python package and raise an error if it is not installed.
callbacks.openai_info.get_openai_token_cost_for_model(...)
Get the cost in USD for a given model and number of tokens.
callbacks.openai_info.standardize_model_name(...)
Standardize the model name to a format that can be used in the OpenAI API.
callbacks.sagemaker_callback.save_json(data, ...)
Save dict to local file path.
callbacks.tracers.comet.import_comet_llm_api()
Import comet_llm api and raise an error if it is not installed.
callbacks.utils.flatten_dict(nested_dict[, ...])
Flattens a nested dictionary into a flat dictionary.
callbacks.utils.hash_string(s)
Hash a string using sha1.
callbacks.utils.import_pandas()