MCPcopy Create free account

hub / github.com/Safiullah-Rahu/CSV-AI / functions

Functions107 in github.com/Safiullah-Rahu/CSV-AI

↓ 7 callersFunctionbuild_provider
Construct an :class:`LLMProvider`. Falls back to :class:`Settings` defaults for any value not supplied, and resolves the API key from setting
app/llm/factory.py:65
↓ 7 callersFunctionprofile_dataframe
Compute summary statistics for ``df``. ``sample_size`` controls how many example values we capture per column — useful for showing the LLM wh
app/data/profiler.py:71
↓ 6 callersFunctionload_csv
Load a CSV from a path, bytes, or file-like object. Raises :class:`DataError` on failure with a readable message. Never silently swallows dec
app/data/loader.py:77
↓ 5 callersFunction_safe_float
(value: Any)
app/data/profiler.py:62
↓ 5 callersFunctionget_logger
Return a namespaced logger under ``csvai.<name>``.
app/utils/logging.py:34
↓ 4 callersFunction_fake_settings
(**overrides)
tests/test_llm_factory.py:23
↓ 4 callersFunctionavailable_models
Return suggested models for ``provider``. Custom names are allowed.
app/llm/factory.py:60
↓ 4 callersFunctionavailable_providers
Return the list of registered provider names.
app/llm/factory.py:55
↓ 4 callersFunctionbuild_dataframe_context
Return a markdown string describing ``df`` for prompt injection.
app/data/context.py:42
↓ 3 callersMethod_normalize
(messages: Iterable[Message])
app/llm/base.py:81
↓ 3 callersMethod_split_system
(messages: Iterable[Message])
app/llm/anthropic_provider.py:63
↓ 3 callersMethodcomplete
Return a single, fully-formed response.
app/llm/base.py:72
↓ 3 callersFunctionget_provider_config
Return (provider, model, temperature, max_tokens, api_key, base_url).
app/ui/components/sidebar.py:154
↓ 3 callersFunctionrender_preview
Render an expandable preview with key metrics + the head of the frame.
app/ui/components/data_preview.py:10
↓ 3 callersFunctionrequire_dataset
Return the loaded dataset or render an info message and ``None``.
app/ui/components/sidebar.py:145
↓ 3 callersFunctionrun
()
app/main.py:33
↓ 3 callersFunctionsmart_sample
Return up to ``n`` rows, stratified when possible.
app/data/sampler.py:13
↓ 3 callersFunctionstream_assistant
Render an assistant message that updates as tokens stream in. Returns the assembled text so the caller can persist it to history.
app/ui/components/chat_box.py:20
↓ 2 callersMethod_build_messages
(self, history: List[Message], question: str)
app/services/chat_service.py:52
↓ 2 callersMethod_ensure_client
(self)
app/llm/anthropic_provider.py:42
↓ 2 callersMethod_ensure_client
(self)
app/llm/openai_provider.py:43
↓ 2 callersMethod_ensure_requests
(self)
app/llm/ollama_provider.py:54
↓ 2 callersMethod_messages
(self, question: str, history: List[Message])
app/services/analysis_service.py:61
↓ 2 callersMethod_messages
(self)
app/services/summary_service.py:31
↓ 2 callersMethod_payload
(self, messages: Iterable[Message], stream: bool)
app/llm/ollama_provider.py:43
↓ 2 callersFunctionbuild_user_question_prompt
Wrap a user question with a light instruction reinforcement. Keeps the user message focused and consistent across providers.
app/prompts/templates.py:68
↓ 2 callersFunctionget_settings
Return a cached :class:`Settings` instance. On Streamlit Community Cloud, ``st.secrets`` provides API keys. We try to merge them in (best-eff
app/config/settings.py:62
↓ 2 callersFunctionrender_history
(history: List[Message])
app/ui/components/chat_box.py:12
↓ 1 callersFunction_charts_view
(df: pd.DataFrame)
app/ui/components/stats_panel.py:84
↓ 1 callersFunction_configure_root
(level: str = "INFO")
app/utils/logging.py:16
↓ 1 callersFunction_correlation_view
(profile: DataProfile)
app/ui/components/stats_panel.py:69
↓ 1 callersFunction_detect_delimiter
(text_sample: str)
app/data/loader.py:69
↓ 1 callersFunction_detect_encoding
Try each candidate encoding until one decodes the first 4 KiB cleanly.
app/data/loader.py:57
↓ 1 callersFunction_get_encoder
(model: str)
app/utils/tokens.py:15
↓ 1 callersFunction_missing_view
(df: pd.DataFrame)
app/ui/components/stats_panel.py:50
↓ 1 callersFunction_numeric_view
(df: pd.DataFrame)
app/ui/components/stats_panel.py:61
↓ 1 callersFunction_read_bytes
(source: Union[str, bytes, IO[bytes]])
app/data/loader.py:37
↓ 1 callersFunction_render_provider_section
(settings)
app/ui/components/sidebar.py:49
↓ 1 callersFunction_render_upload_section
()
app/ui/components/sidebar.py:118
↓ 1 callersFunction_sample_block
(df: pd.DataFrame, max_rows: int)
app/data/context.py:35
↓ 1 callersFunction_schema_block
(profile: DataProfile)
app/data/context.py:26
↓ 1 callersFunction_schema_view
(profile: DataProfile)
app/ui/components/stats_panel.py:34
↓ 1 callersFunction_stratify
Group-by stratified sample, robust across pandas versions.
app/data/sampling_impl.py:39
↓ 1 callersFunction_stratify
Group-by stratified sample, robust across pandas versions.
app/data/sampler.py:34
↓ 1 callersFunctionapply_theme
Inject the dashboard CSS. Idempotent within a session.
app/ui/theme.py:57
↓ 1 callersFunctionhead_tail_sample
First + last rows for compact prompts.
app/data/sampler.py:50
↓ 1 callersFunctioninit_state
Initialize every session key the app reads.
app/ui/state.py:16
↓ 1 callersFunctionrender_sidebar
Render the sidebar and return the currently selected page name.
app/ui/components/sidebar.py:24
↓ 1 callersFunctionrender_stats_tabs
Render a tabbed view: schema, missing, numeric, correlation, charts.
app/ui/components/stats_panel.py:11
↓ 1 callersFunctionreset_analyze
()
app/ui/state.py:39
↓ 1 callersFunctionreset_chat
()
app/ui/state.py:35
↓ 1 callersMethodstream
( self, question: str, history: Optional[List[Message]] = None )
app/services/analysis_service.py:71
↓ 1 callersMethodstream
Token-incremental answer. The caller is responsible for assembly.
app/services/chat_service.py:62
↓ 1 callersMethodto_dict
(self)
app/llm/base.py:26
Method__init__
( self, model: str, *, temperature: float = 0.2, max_tokens: int = 102
app/llm/base.py:55
Method__init__
( self, model: str = "llama3.1", *, temperature: float = 0.2, max_toke
app/llm/ollama_provider.py:25
Method__init__
( self, model: str = "claude-sonnet-4-5", *, temperature: float = 0.2,
app/llm/anthropic_provider.py:23
Method__init__
( self, model: str = "gpt-4o-mini", *, temperature: float = 0.2, max_t
app/llm/openai_provider.py:24
Method__post_init__
(self)
app/services/analysis_service.py:32
Method__post_init__
(self)
app/services/summary_service.py:28
Method__post_init__
(self)
app/services/chat_service.py:42
Functionappend_chat
(history_key: str, role: str, content: str)
app/ui/state.py:43
Methodask
(self, question: str, history: Optional[List[Message]] = None)
app/services/analysis_service.py:68
Methodask
One-shot answer (non-streaming).
app/services/chat_service.py:57
Methodcategorical_top_values
(self, top_n: int = 5)
app/services/analysis_service.py:50
Methodcomplete
(self, messages: Iterable[Message])
app/llm/ollama_provider.py:63
Methodcomplete
(self, messages: Iterable[Message])
app/llm/anthropic_provider.py:74
Methodcomplete
(self, messages: Iterable[Message])
app/llm/openai_provider.py:60
Methodcorrelation
(self)
app/services/analysis_service.py:57
Functiondraw
(g: pd.DataFrame)
app/data/sampling_impl.py:42
Functiondraw
(g: pd.DataFrame)
app/data/sampler.py:37
Functionestimate_tokens
Estimate the number of tokens for ``text``. Uses tiktoken for OpenAI-family models; otherwise approximates one token per four characters (a w
app/utils/tokens.py:27
Methodgenerate
(self)
app/services/summary_service.py:43
Functionhead_tail_sample
Return head + tail rows for compact prompts.
app/data/sampling_impl.py:55
Methodmissing_value_report
(self)
app/services/analysis_service.py:42
Methodnumeric_describe
(self)
app/services/analysis_service.py:47
Functionrender
()
app/ui/pages/chat.py:17
Functionrender
()
app/ui/pages/analyze.py:18
Functionrender
()
app/ui/pages/home.py:8
Functionrender
()
app/ui/pages/summarize.py:15
Functionsample_csv_bytes
A tiny but realistic CSV with mixed dtypes and a missing value.
tests/conftest.py:12
Functionsample_df
(sample_csv_bytes: bytes)
tests/conftest.py:24
Functionsmart_sample
Return at most ``n`` rows from ``df`` using stratification if possible.
app/data/sampling_impl.py:13
Methodstream
Yield incremental text chunks as the model generates.
app/llm/base.py:76
Methodstream
(self, messages: Iterable[Message])
app/llm/ollama_provider.py:86
Methodstream
(self, messages: Iterable[Message])
app/llm/anthropic_provider.py:99
Methodstream
(self, messages: Iterable[Message])
app/llm/openai_provider.py:83
Methodstream
(self)
app/services/summary_service.py:46
Functiontest_accepts_filelike
()
tests/test_loader.py:40
Functiontest_anthropic_splits_system_messages
()
tests/test_llm_factory.py:80
Functiontest_available_models_returns_list
()
tests/test_llm_factory.py:38
Functiontest_available_providers_includes_all
()
tests/test_llm_factory.py:33
Functiontest_build_anthropic_provider
()
tests/test_llm_factory.py:55
Functiontest_build_ollama_provider_uses_base_url
()
tests/test_llm_factory.py:65
Functiontest_build_openai_provider
()
tests/test_llm_factory.py:44
Functiontest_context_contains_schema_and_sample
(sample_df: pd.DataFrame)
tests/test_profiler.py:40
Functiontest_loads_cp1252_with_smart_quotes
()
tests/test_loader.py:28
Functiontest_loads_semicolon_delimited
()
tests/test_loader.py:21
Functiontest_loads_utf8_csv
(sample_csv_bytes: bytes)
tests/test_loader.py:13
Functiontest_profile_basic
(sample_df: pd.DataFrame)
tests/test_profiler.py:12
next →1–100 of 107, ranked by callers