MCPcopy Create free account

hub / github.com/chatbi/chatbi / functions

Functions811 in github.com/chatbi/chatbi

↓ 134 callersMethodget
Get a value from the cache. Args: id: Unique identifier for the cached item field: The field to retrieve fro
chatbi/cache/base.py:21
↓ 48 callersMethodexecute
Execute a raw SQL query and return results. Args: query: SQL query string params: Parameters for the query
chatbi/domain/common/repository.py:368
↓ 38 callersMethodexecute
Execute a SQL query and return results as a list of dictionaries. Args: query: SQL query to execute params:
chatbi/database/drivers/base.py:114
↓ 36 callersMethodflush
Flush pending traces to Langfuse (手动刷新).
chatbi/observability/langfuse_observer.py:273
↓ 21 callersMethodto_domain
Convert ORM entity to domain model
chatbi/domain/mdl/entities.py:105
↓ 16 callersFunctionget_config
Get the application configuration (cached).
chatbi/config.py:308
↓ 14 callersMethodset
Set a value in the cache. Args: id: Unique identifier for the cached item field: The field to set in the cac
chatbi/cache/base.py:43
↓ 14 callersMethodto_domain
转换为领域模型
chatbi/domain/auth/entities.py:33
↓ 13 callersMethodcount
Count total number of entities. Returns: Total count
chatbi/domain/common/repository.py:228
↓ 12 callersMethod__init__
( self, detail: str = "Language Model error", error_code: str = "llm_error", d
chatbi/exceptions/__init__.py:218
↓ 11 callersMethod__init__
(self, detail: str = "Error with language model")
chatbi/exceptions.py:156
↓ 11 callersMethodupdate
更新用户
chatbi/domain/auth/repository.py:45
↓ 10 callersMethod__init__
( self, message: str, status_code: int = status.HTTP_500_INTERNAL_SERVER_ERROR,
chatbi/middleware/error_handler.py:35
↓ 10 callersMethoddelete
删除用户
chatbi/domain/auth/repository.py:61
↓ 10 callersMethodexecute
Execute a SQL query with improved error handling and connection management. Args: query: SQL query to execute
chatbi/database/drivers/sqlite_adapter.py:181
↓ 9 callersMethodcreate
创建用户
chatbi/domain/auth/repository.py:21
↓ 8 callersFunctionaddMessage
(newStoreMessage: Chat.IMessage)
web/src/models/chat.tsx:373
↓ 8 callersMethodfrom_domain
Create ORM entity from domain model
chatbi/domain/mdl/entities.py:129
↓ 8 callersMethodrun
Run complete question answering pipeline with streaming Args: question: User's natural language question pro
chatbi/pipelines/ask/ask_pipeline.py:65
↓ 7 callersMethodclose
Close all connections in the pool and cleanup resources.
chatbi/database/drivers/sqlite_adapter.py:288
↓ 7 callersMethodconnect
Establish a connection to the database. Args: connection_info: Database connection parameters Raises:
chatbi/database/drivers/base.py:37
↓ 7 callersMethodreply
( self, id: str, question: str, table_schema, previous_sql: str = None
chatbi/agent/sql_agent.py:37
↓ 6 callersMethodclose
Close Qdrant connection
chatbi/database/qdrant.py:55
↓ 6 callersMethoddelete
Delete a model
chatbi/domain/mdl/repository.py:292
↓ 6 callersMethodget
Get a value from Redis
chatbi/cache/redis.py:97
↓ 6 callersMethodget_by_id
根据 ID 获取用户
chatbi/domain/auth/repository.py:28
↓ 6 callersFunctionrun_alembic_command
Run an Alembic command with proper environment setup.
chatbi/migrations/manage_migrations.py:46
↓ 5 callersMethodget_connection
Get a connection from the pool or create a new one with validation.
chatbi/database/drivers/sqlite_adapter.py:42
↓ 5 callersFunctionmake_msg
(content="", intent="", answer="", metadata=None)
tests/verify_intelligence_flow.py:8
↓ 5 callersMethodsave_chat_history
Save a chat history record. Args: history_data: Dictionary containing history record attributes Returns:
chatbi/domain/chat/repository.py:150
↓ 4 callersMethod_cleanup_expired
Remove expired cache entries
chatbi/cache/memory.py:95
↓ 4 callersMethod_ensure_pool
Ensure connection pool exists
chatbi/database/database.py:466
↓ 4 callersMethod_extract_conn_params
Extract connection parameters from ConnectionInfo object or dict.
chatbi/database/drivers/postgres_adapter.py:40
↓ 4 callersFunction_find_session_in_args
Find a database session in function arguments or keyword arguments. Args: args: Function positional arguments kwargs: Functi
chatbi/dependencies.py:203
↓ 4 callersMethod_generate_title
Generate simple title from question
chatbi/agent/chart_agent.py:348
↓ 4 callersMethodanalysis
Complete analysis pipeline for a chat request. Args: request: FastAPI request object dto: Chat data transfer
chatbi/domain/chat/service.py:341
↓ 4 callersMethodconnection
Get a raw database connection and cursor with automatic cleanup. Args: dict_cursor: Use dictionary cursor if True, regul
chatbi/database/database.py:251
↓ 4 callersFunctionfile_path
Constructs an absolute file path by joining the directory of the current file with the provided relative path. Args: path (str): The rela
chatbi/utils.py:73
↓ 4 callersMethodfrom_domain
从领域模型创建
chatbi/domain/auth/entities.py:47
↓ 4 callersMethodgenerate
Generate text from prompt (async) Args: prompt: Input prompt temperature: Sampling temperature (0.0-2.0)
chatbi/agent/llm/base_llm.py:23
↓ 4 callersMethodget_by_id_or_error
Get entity by ID or raise NotFoundError. Args: id_value: Primary key value Returns: Entity
chatbi/domain/common/repository.py:194
↓ 4 callersMethodreplay
Classify user's question intent
chatbi/agent/intent_agent.py:35
↓ 4 callersMethodrun
Execute SQL with retry logic. Args: query_id: Query ID (usually ChatSession ID or specific Query ID) initial
chatbi/pipelines/execution/execution_pipeline.py:26
↓ 4 callersMethodtest_connection
Test connection to a datasource using the optimized ConnectionManager. Args: db_type: Database type connecti
chatbi/domain/datasource/service.py:330
↓ 3 callersMethod_sanitize_connection_info
Remove or mask sensitive information from connection_info. Args: connection_info: Original connection info f
chatbi/domain/datasource/service.py:620
↓ 3 callersMethod_sync_get_by_id
Get entity by ID synchronously.
chatbi/domain/common/repository.py:63
↓ 3 callersMethodclose
Close the MySQL database connection. Raises: DatabaseError: If connection cannot be closed properly
chatbi/database/drivers/mysql_adapter.py:299
↓ 3 callersMethodclose
Close the PostgreSQL database connection. Raises: DatabaseError: If connection cannot be closed properly
chatbi/database/drivers/postgres_adapter.py:354
↓ 3 callersMethodconnect
Establish a connection to the MySQL database. Args: connection_info: MySQL connection parameters Raises:
chatbi/database/drivers/mysql_adapter.py:40
↓ 3 callersMethodconnect
Establish a connection to the PostgreSQL database. Args: connection_info: PostgreSQL connection parameters Rais
chatbi/database/drivers/postgres_adapter.py:65
↓ 3 callersFunctioncreate_adapter
Create a new instance of the appropriate database adapter. Args: db_type: Type of database Returns: DatabaseAdapter ins
chatbi/database/drivers/factory.py:290
↓ 3 callersMethoddelete
Delete entity by ID. Args: id_value: Primary key value Returns: True if deleted, False if not found
chatbi/domain/common/repository.py:267
↓ 3 callersMethoddelete_by_token
删除会话
chatbi/domain/auth/repository.py:148
↓ 3 callersMethodgenerate_stream
Generate text from prompt with streaming (async) Args: prompt: Input prompt temperature: Sampling temperatur
chatbi/agent/llm/base_llm.py:37
↓ 3 callersFunctionget_adapter_status
Get status information about database adapters and connections. Returns: Dictionary with adapter status information
chatbi/database/drivers/factory.py:377
↓ 3 callersMethodget_by_id
Get model by ID with columns
chatbi/domain/mdl/repository.py:227
↓ 3 callersMethodget_chat_session_by_id
Get chat session by ID. Args: id: Chat session ID Returns: Chat session if found, None otherwise
chatbi/domain/chat/repository.py:33
↓ 3 callersMethodget_model
(self)
chatbi/agent/llm/__init__.py:10
↓ 3 callersFunctionget_rate_limiter
Get the global rate limiter instance. Args: redis_client: Optional Redis client to use Returns: Singleton EnhancedRa
chatbi/middleware/enhanced_rate_limiter.py:320
↓ 3 callersMethodinit_logger
Initialize logger with configured settings.
chatbi/config.py:215
↓ 3 callersFunctiononSubmit
(nextContent: string)
web/src/models/chat.tsx:378
↓ 3 callersMethodsearch
Search for similar vectors
chatbi/database/qdrant.py:110
↓ 3 callersMethodto_json
Convert configuration to JSON-serializable dict.
chatbi/config.py:275
↓ 3 callersMethodupdate
Update model fields
chatbi/domain/mdl/repository.py:262
↓ 2 callersMethod_async_get_by_id
Get entity by ID asynchronously.
chatbi/domain/common/repository.py:47
↓ 2 callersMethod_check_window_memory
Check rate limit using in-memory storage (fallback). Uses deque to store timestamps with sliding window.
chatbi/middleware/enhanced_rate_limiter.py:217
↓ 2 callersMethod_cleanup_expired
Clean up expired connections. This method is called periodically and closes connections that have been idle for too long.
chatbi/database/drivers/factory.py:180
↓ 2 callersMethod_close_connection
Close a specific connection. Args: conn_id: Connection ID to close
chatbi/database/drivers/factory.py:207
↓ 2 callersMethod_configure_connection
Configure connection with optimization settings.
chatbi/database/drivers/duckdb_adapter.py:69
↓ 2 callersMethod_create_token_pair
生成 Token 对
chatbi/domain/auth/service.py:173
↓ 2 callersMethod_ensure_collection
Ensure history collection exists
chatbi/pipelines/retrieval/history_retrieval.py:156
↓ 2 callersMethod_generate_embedding
Generate embedding for text
chatbi/pipelines/retrieval/history_retrieval.py:166
↓ 2 callersMethod_get_client_ip
Extract client IP from request, properly handling proxies
chatbi/middleware/rate_limiter.py:158
↓ 2 callersMethod_get_fallback_answer
Generate simple fallback answer
chatbi/agent/answer_agent.py:254
↓ 2 callersMethod_get_fallback_config
Get fallback table configuration
chatbi/agent/chart_agent.py:356
↓ 2 callersMethod_get_prompt
Generate answer summarization prompt
chatbi/agent/answer_agent.py:27
↓ 2 callersMethod_get_prompt
Generate reasoning prompt
chatbi/agent/reasoning_agent.py:29
↓ 2 callersMethod_log_attempt
( self, query_id: str, attempt: int, original_sql: str, error_message:
chatbi/pipelines/execution/execution_pipeline.py:112
↓ 2 callersMethod_should_sample
Determine if this call should be sampled (根据采样率).
chatbi/observability/langfuse_observer.py:61
↓ 2 callersMethod_sync_count
Count total number of entities synchronously.
chatbi/domain/common/repository.py:94
↓ 2 callersMethod_sync_create
Create new entity synchronously.
chatbi/domain/common/repository.py:110
↓ 2 callersMethod_sync_delete
Delete entity by ID synchronously.
chatbi/domain/common/repository.py:161
↓ 2 callersMethod_sync_get_all
Get all entities with pagination synchronously.
chatbi/domain/common/repository.py:83
↓ 2 callersMethod_sync_update
Update existing entity synchronously.
chatbi/domain/common/repository.py:134
↓ 2 callersMethodcheck_health
Check database health and connection status. Returns: Dictionary with health check results
chatbi/database/database.py:407
↓ 2 callersMethodcheck_rate_limit
Check if request should be rate limited. Args: request: FastAPI request user_id: Optional authenticated user
chatbi/middleware/enhanced_rate_limiter.py:81
↓ 2 callersFunctioncmd_init
Initialize migrations.
chatbi/migrations/manage_migrations.py:138
↓ 2 callersMethodconnect
Establish a connection to the DuckDB database. Args: connection_info: DuckDB connection parameters Raises:
chatbi/database/drivers/duckdb_adapter.py:36
↓ 2 callersMethodcreate
Create a new model
chatbi/domain/mdl/repository.py:247
↓ 2 callersFunctioncreate_database
Create the database if it doesn't exist.
chatbi/migrations/manage_migrations.py:82
↓ 2 callersMethodcreate_query_history
Create a new query history record. Args: query_data: Query history data dictionary Returns: New Que
chatbi/domain/datasource/repository.py:144
↓ 2 callersMethodexecute_query
Execute SQL query using the optimized ConnectionManager with retries. Args: datasource_id: ID of the datasource to query
chatbi/domain/datasource/service.py:407
↓ 2 callersMethodgenerate_id
Generate a unique ID for the cache. Returns: str: A unique identifier
chatbi/cache/base.py:12
↓ 2 callersMethodgenerate_sql
Generate SQL query from natural language question. Args: request: FastAPI request object id: ChatSession ID
chatbi/domain/chat/service.py:569
↓ 2 callersFunctiongetDatasource
* Get a datasource by ID * @param id - Datasource ID * @returns Datasource details
web/src/services/datasource.ts:59
↓ 2 callersFunctiongetDatasources
* Get a paginated list of datasources * @param params - Pagination parameters and filters * @returns List of datasources
web/src/services/datasource.ts:35
↓ 2 callersMethodget_all
Get all entities with pagination. Args: skip: Number of records to skip limit: Maximum number of records to
chatbi/domain/common/repository.py:213
↓ 2 callersFunctionget_async_session_direct
Get a database session directly without using a context manager. IMPORTANT: The caller is responsible for committing/rolling back an
chatbi/database/database.py:624
↓ 2 callersMethodget_by_email
根据邮箱获取用户
chatbi/domain/auth/repository.py:39
↓ 2 callersMethodget_by_id
Get entity by ID. Automatically uses sync or async implementation based on session type. Args: id_value: Primar
chatbi/domain/common/repository.py:178
next →1–100 of 811, ranked by callers