OpenChatBI

Documentation:

  • OpenChatBI Documentation

API Reference:

  • Core Module
    • Main Module
      • get_default_graph()
    • Agent Graph
      • ask_human()
      • CallSQLGraphInput
        • CallSQLGraphInput.reasoning
        • CallSQLGraphInput.context
        • CallSQLGraphInput.model_config
      • get_sql_tools()
      • agent_llm_call()
      • build_agent_graph_sync()
      • build_agent_graph_async()
    • State Management
      • add_history_messages()
      • AgentState
        • AgentState.history_messages
        • AgentState.agent_next_node
        • AgentState.sends
        • AgentState.sql
        • AgentState.final_answer
        • AgentState.messages
      • SQLGraphState
        • SQLGraphState.rewrite_question
        • SQLGraphState.tables
        • SQLGraphState.info_entities
        • SQLGraphState.sql
        • SQLGraphState.sql_retry_count
        • SQLGraphState.sql_execution_result
        • SQLGraphState.schema_info
        • SQLGraphState.data
        • SQLGraphState.previous_sql_errors
        • SQLGraphState.visualization_dsl
        • SQLGraphState.sql_confidence
        • SQLGraphState.confidence_reasons
        • SQLGraphState.human_sql_decision
        • SQLGraphState.recovery_strategy
        • SQLGraphState.messages
      • InputState
        • InputState.messages
      • OutputState
        • OutputState.messages
      • SQLOutputState
        • SQLOutputState.rewrite_question
        • SQLOutputState.tables
        • SQLOutputState.sql
        • SQLOutputState.schema_info
        • SQLOutputState.data
        • SQLOutputState.visualization_dsl
        • SQLOutputState.sql_confidence
        • SQLOutputState.confidence_reasons
        • SQLOutputState.human_sql_decision
        • SQLOutputState.recovery_strategy
        • SQLOutputState.messages
    • Utilities
      • log()
      • get_text_from_content()
      • get_text_from_message_chunk()
      • extract_json_from_answer()
      • get_report_download_response()
      • create_vector_db()
      • recover_incomplete_tool_calls()
      • SimpleStore
        • SimpleStore.__init__()
        • SimpleStore.similarity_search()
        • SimpleStore.similarity_search_with_score()
        • SimpleStore.add_texts()
        • SimpleStore.delete()
        • SimpleStore.get_by_ids()
        • SimpleStore.from_texts()
        • SimpleStore.max_marginal_relevance_search()
  • Configuration
    • Config
      • Config
        • Config.organization
        • Config.dialect
        • Config.default_llm
        • Config.embedding_model
        • Config.text2sql_llm
        • Config.bi_config
        • Config.data_warehouse_config
        • Config.model_config
        • Config.analysis_llm
        • Config.llm_provider
        • Config.llm_providers
        • Config.vector_db_path
        • Config.visualization_mode
        • Config.enable_sql_result_limit
        • Config.sql_result_limit
        • Config.enable_confidence_gate
        • Config.sql_confidence_threshold
        • Config.confidence_gate_mode
        • Config.confidence_evaluator_mode
        • Config.enable_empty_result_error
        • Config.enable_golden_sql
        • Config.golden_sql_namespace
        • Config.sql_max_retries
        • Config.retry_on_timeout
        • Config.retry_strategy_overrides
        • Config.context_config
        • Config.memory_config
        • Config.observability
        • Config.timeseries_forecasting_service_url
        • Config.timeseries_forecasting_min_input_length
        • Config.from_dict()
    • ConfigLoader
      • ConfigLoader
        • ConfigLoader.llm_configs
        • ConfigLoader.get()
        • ConfigLoader.load()
        • ConfigLoader.load_bi_config()
        • ConfigLoader.set()
  • Catalog System
    • Overview
    • Catalog Store
      • CatalogStore
        • CatalogStore.get_data_warehouse_config()
        • CatalogStore.get_sql_engine()
        • CatalogStore.get_database_list()
        • CatalogStore.get_table_list()
        • CatalogStore.get_column_list()
        • CatalogStore.get_table_information()
        • CatalogStore.get_sql_examples()
        • CatalogStore.get_table_selection_examples()
        • CatalogStore.save_table_information()
        • CatalogStore.save_table_sql_examples()
        • CatalogStore.append_sql_example()
        • CatalogStore.save_table_selection_examples()
        • CatalogStore.check_exists()
      • split_db_table_name()
      • Filesystem Implementation
        • FileSystemCatalogStore
    • Catalog Loader
      • DataCatalogLoader
        • DataCatalogLoader.__init__()
        • DataCatalogLoader.get_tables_and_columns()
        • DataCatalogLoader.get_table_indexes()
        • DataCatalogLoader.get_foreign_keys()
        • DataCatalogLoader.save_to_catalog_store()
      • load_catalog_from_data_warehouse()
    • Schema Retrieval
      • column_retrieval()
      • merge_list()
      • edit_distance_score()
      • edit_distance_search()
      • bm25_search()
      • get_relevant_columns()
  • Text2SQL System
    • Overview
    • SQL Graph
      • ask_human()
      • route_after_confidence()
      • build_sql_graph()
    • SQL Generation
      • create_sql_nodes()
      • should_execute_sql()
    • Schema Linking
      • schema_linking()
    • Information Extraction
      • information_extraction()
      • information_extraction_conditional_edges()
    • Text2SQL Utilities
      • LearnedSQLStore
        • LearnedSQLStore.__init__()
        • LearnedSQLStore.add()
        • LearnedSQLStore.add_golden_sql()
        • LearnedSQLStore.retrieve()
  • Data Analysis Agent
    • Data Analysis Package (openchatbi.analysis)
      • Layout
      • 1. Data Analysis Agent (agent.py)
        • Public API
        • Tool set
        • Supported scenarios (prompt-driven workflows)
        • LLM selection
        • Sub-agent isolation
      • 2. Anomaly Detection (anomaly_detection.py)
        • Output
        • Scoring strategy
        • Input contract
      • 3. Anomaly Drill-Down / Adtributor (adtributor.py, models.py)
        • Core concepts
        • Absolute vs derived metrics
        • Output (AdtributorOutput)
        • Input contract (tool layer)
      • See also
    • API Reference
      • build_data_analysis_agent()
      • DataAnalysisInput
        • DataAnalysisInput.reasoning
        • DataAnalysisInput.task
        • DataAnalysisInput.model_config
      • get_data_analysis_tool()
      • evaluate_anomalies()
      • detect_anomaly_range()
      • format_anomaly_report()
      • format_anomaly_range_report()
      • additional_check()
      • add_surprise()
      • add_explanatory_power()
      • merge_dimensions()
      • adtributor()
      • DimensionResult
        • DimensionResult.explanatory_power
        • DimensionResult.total_surprise
        • DimensionResult.elements
        • DimensionResult.surprise
        • DimensionResult.reason
        • DimensionResult.model_config
      • AdtributorOutput
        • AdtributorOutput.root_causes
        • AdtributorOutput.ranked_dimensions
        • AdtributorOutput.dimension_details
        • AdtributorOutput.status
        • AdtributorOutput.reason_flag
        • AdtributorOutput.model_config
  • Code Execution
    • Code Module
    • Executor Base
      • ExecutorBase
        • ExecutorBase.__init__()
        • ExecutorBase.run_code()
        • ExecutorBase.set_variable()
    • Local Executor
      • LocalExecutor
        • LocalExecutor.run_code()
  • LLM Integration
    • LLM Module
    • LLM Implementation
      • list_llm_providers()
      • get_embedding_model()
      • get_default_llm()
      • get_llm()
      • get_text2sql_llm()
      • get_analysis_llm()
      • call_llm_chat_model_with_retry()
  • Tools and Utilities
    • Overview
    • Python Code Execution
      • PythonCodeInput
        • PythonCodeInput.reasoning
        • PythonCodeInput.code
        • PythonCodeInput.model_config
    • Human Interaction
      • AskHuman
        • AskHuman.question
        • AskHuman.options
        • AskHuman.model_config
    • Memory Management
      • UserProfile
        • UserProfile.name
        • UserProfile.language
        • UserProfile.timezone
        • UserProfile.jargon
        • UserProfile.model_config
      • get_sync_memory_store()
      • get_async_memory_store()
      • cleanup_async_memory_store()
      • setup_async_memory_store()
      • fix_schema_for_openai()
      • get_memory_manager()
      • StructuredToolWithRequired
        • StructuredToolWithRequired.__init__()
        • StructuredToolWithRequired.tool_call_schema
        • StructuredToolWithRequired.model_config
      • get_memory_tools()
      • get_async_memory_tools()
    • Knowledge Search
      • SearchInput
        • SearchInput.reasoning
        • SearchInput.query_list
        • SearchInput.knowledge_bases
        • SearchInput.with_table_list
        • SearchInput.model_config
      • ShowSchemaInput
        • ShowSchemaInput.reasoning
        • ShowSchemaInput.tables
        • ShowSchemaInput.model_config
    • Anomaly Detection
      • AnomalyDetectionInput
        • AnomalyDetectionInput.reasoning
        • AnomalyDetectionInput.input_data
        • AnomalyDetectionInput.detection_range
        • AnomalyDetectionInput.frequency
        • AnomalyDetectionInput.stride
        • AnomalyDetectionInput.target_column
        • AnomalyDetectionInput.input_length
        • AnomalyDetectionInput.drop_weight
        • AnomalyDetectionInput.rise_weight
        • AnomalyDetectionInput.model_config
    • Anomaly Drill-Down (Adtributor)
      • DrilldownRow
        • DrilldownRow.dimension_name
        • DrilldownRow.element_value
        • DrilldownRow.predict
        • DrilldownRow.real
        • DrilldownRow.predict_numerator
        • DrilldownRow.predict_denominator
        • DrilldownRow.real_numerator
        • DrilldownRow.real_denominator
        • DrilldownRow.proportion
        • DrilldownRow.base_proportion
        • DrilldownRow.model_config
      • AdtributorToolInput
        • AdtributorToolInput.reasoning
        • AdtributorToolInput.data
        • AdtributorToolInput.derived
        • AdtributorToolInput.issue_type
        • AdtributorToolInput.tep
        • AdtributorToolInput.teep
        • AdtributorToolInput.k
        • AdtributorToolInput.model_config
    • Data Analysis Agent
  • Time Series Forecasting Service
    • Transformer Time Series Forecasting Service
      • Features
      • Prerequisites
      • Quick Start
        • 1. Download Transformer Model
        • 2. Make a Prediction
        • 4. Test the Service
      • API Reference
        • Prediction Endpoint
      • Configuration
        • Environment Variables
        • Docker Run Options
      • Testing
        • Service Tests
      • Model Information
      • Troubleshooting
        • Common Issues
        • Debug Mode
      • Performance
      • Limitations
OpenChatBI
  • Search


© Copyright 2025, Yu Zhong.

Built with Sphinx using a theme provided by Read the Docs.