Skip to main content
Constructor method for initializing a DataAnalyzr object.

Parameters

Literal['sql', 'ml', 'skip']
required
The type of analysis to be performed.
string
API key for accessing LLM services. May also be set as an environment variable.
dictionary
Dictionary of class parameters. Accepts max_retries, time_limit, and auto_train.
LiteLLM
LLM instance for generating analysis. Default LLM used is GPT-4o.
For details on configuring the LLM, see the Large Language Models guide.
LiteLLM
LLM instance for performing analysis. Default LLM used is GPT-4o.
For details on configuring the LLM, see the Large Language Models guide.
string or dictionary
Context for analysis and response generation. Default is an empty string.
  • This context is used in the analysis, insights, recommendations, and tasks methods.
  • When passed as a string, the same context is applied to all sections - analysis, insights, recommendations, and tasks.
  • When passed as a dictionary, it should have keys analysis, visualisation, insights, recommendations, and tasks.
  • To override the class context for a specific query, pass the context to the ask method.
dictionary
Dictionary of logging parameters. Accepts log_filename, log_level, and print_log.

Returns

DataAnalyzr
DataAnalyzr object for performing conversational data analysis.

Example usage