LeoAi Lite

by rodmanaico.huggingface.rodmanai/leoai-lite

  • Remote endpoint
  • 55 tools

Tools

  • LeoAi_Lite__lambda_ If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite__lambda__1 If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite__lambda__10 If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite__lambda__11
  • LeoAi_Lite__lambda__12
  • LeoAi_Lite__lambda__13
  • LeoAi_Lite__lambda__14
  • LeoAi_Lite__lambda__15
  • LeoAi_Lite__lambda__16 If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite__lambda__17
  • LeoAi_Lite__lambda__18 If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite__lambda__19
  • LeoAi_Lite__lambda__2
  • LeoAi_Lite__lambda__20 If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite__lambda__21 If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite__lambda__3 If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite__lambda__4
  • LeoAi_Lite__lambda__5 If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite__lambda__6
  • LeoAi_Lite__lambda__7 If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite__lambda__8
  • LeoAi_Lite__lambda__9 If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite__refresh_recent_buttons
  • LeoAi_Lite_ask_leo Ask Leo a question about his background, projects, or experience. Returns Leo's first-person answer grounded in his resume and live GitHub activity. Use this when a user wants to know something about Leo (Leonard Rodman, an AI Solution Architect / Automation Engineer based in Chicago who works with Claude API, Workato, and LangChain). This is the entry point exposed as an MCP tool — Claude Desktop, Cursor, Windsurf, and other MCP clients can call this to query Leo's bio without leaving their tool.
  • LeoAi_Lite_build_user_store Index each new source into its own HybridIndex inside a per-session dict. Each file / URL / pasted block becomes a separately-toggleable entry keyed by filename or URL (pasted text uses a fixed key and is replaced on re-paste). When `local_only` is True, URL fetching is blocked — only files and pasted text are accepted, so no outbound HTTP happens for privacy-conscious sessions. If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite_cluster_topics Render the top-N most-mentioned content words across all logged questions. Lightweight word-frequency over the question log — not real clustering, but enough to see what visitors are asking about. Filters out a small stopword set so the list isn't dominated by question fillers.
  • LeoAi_Lite_export_chat Write the conversation to a temp Markdown file and return its path. Returns None if there's nothing to export, which Gradio's File output treats as "no file" (the download component just clears). If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite_hydrate_from_localstorage Receive name + recent questions from JS-side localStorage on page load.
  • LeoAi_Lite_maybe_generate_quick_replies Render up to 3 follow-up questions as Markdown after a turn. Wired via .then() after each respond() so the chips appear a moment after the answer rather than blocking the answer's render. If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite_maybe_generate_quick_replies_1 Render up to 3 follow-up questions as Markdown after a turn. Wired via .then() after each respond() so the chips appear a moment after the answer rather than blocking the answer's render. If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite_maybe_generate_quick_replies_2 Render up to 3 follow-up questions as Markdown after a turn. Wired via .then() after each respond() so the chips appear a moment after the answer rather than blocking the answer's render. If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite_maybe_generate_quick_replies_3 Render up to 3 follow-up questions as Markdown after a turn. Wired via .then() after each respond() so the chips appear a moment after the answer rather than blocking the answer's render. If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite_maybe_generate_quick_replies_4 Render up to 3 follow-up questions as Markdown after a turn. Wired via .then() after each respond() so the chips appear a moment after the answer rather than blocking the answer's render. If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite_maybe_generate_quick_replies_5 Render up to 3 follow-up questions as Markdown after a turn. Wired via .then() after each respond() so the chips appear a moment after the answer rather than blocking the answer's render. If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite_maybe_generate_quick_replies_6 Render up to 3 follow-up questions as Markdown after a turn. Wired via .then() after each respond() so the chips appear a moment after the answer rather than blocking the answer's render. If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite_maybe_generate_quick_replies_7 Render up to 3 follow-up questions as Markdown after a turn. Wired via .then() after each respond() so the chips appear a moment after the answer rather than blocking the answer's render. If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite_maybe_generate_quick_replies_8 Render up to 3 follow-up questions as Markdown after a turn. Wired via .then() after each respond() so the chips appear a moment after the answer rather than blocking the answer's render. If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite_maybe_generate_quick_replies_9 Render up to 3 follow-up questions as Markdown after a turn. Wired via .then() after each respond() so the chips appear a moment after the answer rather than blocking the answer's render. If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite_regenerate_last Re-run the last turn with the same inputs to get a fresh answer. Pops the last assistant turn (and its preceding user turn), then delegates to respond() with the same user message. Useful when the answer is weak and the visitor wants another shot without retyping. If a user passes a file as an input, use the upload_file_to_gradio tool, if present, to upload the file to the gradio app and create a Gradio File Input. Then use the returned path as the input to the tool
  • LeoAi_Lite_render_dashboard Aggregate the question log into a Markdown dashboard with text bars. No new dependencies — unicode block characters render as a serviceable bar chart inside the existing gr.Markdown component. Three views: route distribution, confidence distribution, and a daily volume series over the most recent 14 days.
  • LeoAi_Lite_respond Fetch a reply: route → retrieve (optionally multi-query) → rerank → prompt → yield. Yields twice — first a "_Thinking..._" placeholder so the UI shows a pending turn while inference runs, then the full answer. flan-t5 via HuggingFacePipeline doesn't expose token-level streaming, so this is a two-yield interaction rather than a true stream. Modes that change behavior: - `use_multi_query`: rephrase the question 3 ways (one extra LLM call) and union retrievals from each — better recall. - `compare_mode`: force balanced per-corpus retrieval and switch to a side-by-side comparison template that splits Leo's chunks and the visitor's chunks into separate prompt sections. No-ops to regular behavior when the visitor has no uploads. - `strict_mode`: refuse to answer outside the retrieved context. The cross-encoder reranker (when enabled) reorders chunks and supplies the scores for the confidence label. Per-stage wall-clock timings are surfaced in the sources panel header. Each completed turn is
  • LeoAi_Lite_respond_1 Fetch a reply: route → retrieve (optionally multi-query) → rerank → prompt → yield. Yields twice — first a "_Thinking..._" placeholder so the UI shows a pending turn while inference runs, then the full answer. flan-t5 via HuggingFacePipeline doesn't expose token-level streaming, so this is a two-yield interaction rather than a true stream. Modes that change behavior: - `use_multi_query`: rephrase the question 3 ways (one extra LLM call) and union retrievals from each — better recall. - `compare_mode`: force balanced per-corpus retrieval and switch to a side-by-side comparison template that splits Leo's chunks and the visitor's chunks into separate prompt sections. No-ops to regular behavior when the visitor has no uploads. - `strict_mode`: refuse to answer outside the retrieved context. The cross-encoder reranker (when enabled) reorders chunks and supplies the scores for the confidence label. Per-stage wall-clock timings are surfaced in the sources panel header. Each completed turn is
  • LeoAi_Lite_respond_2 Fetch a reply: route → retrieve (optionally multi-query) → rerank → prompt → yield. Yields twice — first a "_Thinking..._" placeholder so the UI shows a pending turn while inference runs, then the full answer. flan-t5 via HuggingFacePipeline doesn't expose token-level streaming, so this is a two-yield interaction rather than a true stream. Modes that change behavior: - `use_multi_query`: rephrase the question 3 ways (one extra LLM call) and union retrievals from each — better recall. - `compare_mode`: force balanced per-corpus retrieval and switch to a side-by-side comparison template that splits Leo's chunks and the visitor's chunks into separate prompt sections. No-ops to regular behavior when the visitor has no uploads. - `strict_mode`: refuse to answer outside the retrieved context. The cross-encoder reranker (when enabled) reorders chunks and supplies the scores for the confidence label. Per-stage wall-clock timings are surfaced in the sources panel header. Each completed turn is
  • LeoAi_Lite_respond_3 Fetch a reply: route → retrieve (optionally multi-query) → rerank → prompt → yield. Yields twice — first a "_Thinking..._" placeholder so the UI shows a pending turn while inference runs, then the full answer. flan-t5 via HuggingFacePipeline doesn't expose token-level streaming, so this is a two-yield interaction rather than a true stream. Modes that change behavior: - `use_multi_query`: rephrase the question 3 ways (one extra LLM call) and union retrievals from each — better recall. - `compare_mode`: force balanced per-corpus retrieval and switch to a side-by-side comparison template that splits Leo's chunks and the visitor's chunks into separate prompt sections. No-ops to regular behavior when the visitor has no uploads. - `strict_mode`: refuse to answer outside the retrieved context. The cross-encoder reranker (when enabled) reorders chunks and supplies the scores for the confidence label. Per-stage wall-clock timings are surfaced in the sources panel header. Each completed turn is
  • LeoAi_Lite_respond_4 Fetch a reply: route → retrieve (optionally multi-query) → rerank → prompt → yield. Yields twice — first a "_Thinking..._" placeholder so the UI shows a pending turn while inference runs, then the full answer. flan-t5 via HuggingFacePipeline doesn't expose token-level streaming, so this is a two-yield interaction rather than a true stream. Modes that change behavior: - `use_multi_query`: rephrase the question 3 ways (one extra LLM call) and union retrievals from each — better recall. - `compare_mode`: force balanced per-corpus retrieval and switch to a side-by-side comparison template that splits Leo's chunks and the visitor's chunks into separate prompt sections. No-ops to regular behavior when the visitor has no uploads. - `strict_mode`: refuse to answer outside the retrieved context. The cross-encoder reranker (when enabled) reorders chunks and supplies the scores for the confidence label. Per-stage wall-clock timings are surfaced in the sources panel header. Each completed turn is
  • LeoAi_Lite_respond_5 Fetch a reply: route → retrieve (optionally multi-query) → rerank → prompt → yield. Yields twice — first a "_Thinking..._" placeholder so the UI shows a pending turn while inference runs, then the full answer. flan-t5 via HuggingFacePipeline doesn't expose token-level streaming, so this is a two-yield interaction rather than a true stream. Modes that change behavior: - `use_multi_query`: rephrase the question 3 ways (one extra LLM call) and union retrievals from each — better recall. - `compare_mode`: force balanced per-corpus retrieval and switch to a side-by-side comparison template that splits Leo's chunks and the visitor's chunks into separate prompt sections. No-ops to regular behavior when the visitor has no uploads. - `strict_mode`: refuse to answer outside the retrieved context. The cross-encoder reranker (when enabled) reorders chunks and supplies the scores for the confidence label. Per-stage wall-clock timings are surfaced in the sources panel header. Each completed turn is
  • LeoAi_Lite_respond_6 Fetch a reply: route → retrieve (optionally multi-query) → rerank → prompt → yield. Yields twice — first a "_Thinking..._" placeholder so the UI shows a pending turn while inference runs, then the full answer. flan-t5 via HuggingFacePipeline doesn't expose token-level streaming, so this is a two-yield interaction rather than a true stream. Modes that change behavior: - `use_multi_query`: rephrase the question 3 ways (one extra LLM call) and union retrievals from each — better recall. - `compare_mode`: force balanced per-corpus retrieval and switch to a side-by-side comparison template that splits Leo's chunks and the visitor's chunks into separate prompt sections. No-ops to regular behavior when the visitor has no uploads. - `strict_mode`: refuse to answer outside the retrieved context. The cross-encoder reranker (when enabled) reorders chunks and supplies the scores for the confidence label. Per-stage wall-clock timings are surfaced in the sources panel header. Each completed turn is
  • LeoAi_Lite_respond_7 Fetch a reply: route → retrieve (optionally multi-query) → rerank → prompt → yield. Yields twice — first a "_Thinking..._" placeholder so the UI shows a pending turn while inference runs, then the full answer. flan-t5 via HuggingFacePipeline doesn't expose token-level streaming, so this is a two-yield interaction rather than a true stream. Modes that change behavior: - `use_multi_query`: rephrase the question 3 ways (one extra LLM call) and union retrievals from each — better recall. - `compare_mode`: force balanced per-corpus retrieval and switch to a side-by-side comparison template that splits Leo's chunks and the visitor's chunks into separate prompt sections. No-ops to regular behavior when the visitor has no uploads. - `strict_mode`: refuse to answer outside the retrieved context. The cross-encoder reranker (when enabled) reorders chunks and supplies the scores for the confidence label. Per-stage wall-clock timings are surfaced in the sources panel header. Each completed turn is
  • LeoAi_Lite_respond_8 Fetch a reply: route → retrieve (optionally multi-query) → rerank → prompt → yield. Yields twice — first a "_Thinking..._" placeholder so the UI shows a pending turn while inference runs, then the full answer. flan-t5 via HuggingFacePipeline doesn't expose token-level streaming, so this is a two-yield interaction rather than a true stream. Modes that change behavior: - `use_multi_query`: rephrase the question 3 ways (one extra LLM call) and union retrievals from each — better recall. - `compare_mode`: force balanced per-corpus retrieval and switch to a side-by-side comparison template that splits Leo's chunks and the visitor's chunks into separate prompt sections. No-ops to regular behavior when the visitor has no uploads. - `strict_mode`: refuse to answer outside the retrieved context. The cross-encoder reranker (when enabled) reorders chunks and supplies the scores for the confidence label. Per-stage wall-clock timings are surfaced in the sources panel header. Each completed turn is
  • LeoAi_Lite_run_eval Run the retrieval-recall eval set against the default Leo corpus. For each question, retrieve top chunks (with the same routing + reranking pipeline used by respond) and check whether ALL expected keywords appear case-insensitive in any single chunk. Returns a Markdown table with the pass/fail per question, plus a footer with the aggregate pass rate. Does not call the LLM — this measures retrieval quality, not generation faithfulness.
  • LeoAi_Lite_score_jd_against_leo Score a job description against Leo's corpus. Pipeline: extract 5 requirements via one LLM call → for each requirement, retrieve top-2 from Leo's HybridIndex → cross-encoder score the best chunk against the requirement → render as a Markdown table with an overall fit verdict from the mean score.
  • LeoAi_Lite_summarize_active_sources Run a single LLM call per active uploaded source to produce a 3-bullet TL;DR. Opt-in (button-triggered) so visitors don't pay the wait if they don't want it. Caps the body fed to the LLM at ~2000 chars to keep each summary call fast on flan-t5-large CPU.
  • LeoAi_Lite_view_flagged_log Render the last 10 flagged (low-confidence) answers as a Markdown table.
  • LeoAi_Lite_view_question_log Render the last 20 logged questions as a Markdown table with totals.
  • LeoAi_Lite_warmup_model Pre-download the LLM and reranker on page load with a visible progress bar. Idempotent — if either model is already in the local HF cache (warm Space or repeat visit), snapshot_download returns near-instantly. Wired into demo.load() so the meter runs once per session before the visitor sends their first message.

As the server's own listing gives them. We never call a tool.