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 toolLeoAi_Lite__lambda__1If 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 toolLeoAi_Lite__lambda__10If 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 toolLeoAi_Lite__lambda__11LeoAi_Lite__lambda__12LeoAi_Lite__lambda__13LeoAi_Lite__lambda__14LeoAi_Lite__lambda__15LeoAi_Lite__lambda__16If 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 toolLeoAi_Lite__lambda__17LeoAi_Lite__lambda__18If 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 toolLeoAi_Lite__lambda__19LeoAi_Lite__lambda__2LeoAi_Lite__lambda__20If 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 toolLeoAi_Lite__lambda__21If 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 toolLeoAi_Lite__lambda__3If 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 toolLeoAi_Lite__lambda__4LeoAi_Lite__lambda__5If 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 toolLeoAi_Lite__lambda__6LeoAi_Lite__lambda__7If 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 toolLeoAi_Lite__lambda__8LeoAi_Lite__lambda__9If 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 toolLeoAi_Lite__refresh_recent_buttonsLeoAi_Lite_ask_leoAsk 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_storeIndex 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 toolLeoAi_Lite_cluster_topicsRender 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_chatWrite 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 toolLeoAi_Lite_hydrate_from_localstorageReceive name + recent questions from JS-side localStorage on page load.LeoAi_Lite_maybe_generate_quick_repliesRender 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 toolLeoAi_Lite_maybe_generate_quick_replies_1Render 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 toolLeoAi_Lite_maybe_generate_quick_replies_2Render 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 toolLeoAi_Lite_maybe_generate_quick_replies_3Render 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 toolLeoAi_Lite_maybe_generate_quick_replies_4Render 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 toolLeoAi_Lite_maybe_generate_quick_replies_5Render 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 toolLeoAi_Lite_maybe_generate_quick_replies_6Render 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 toolLeoAi_Lite_maybe_generate_quick_replies_7Render 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 toolLeoAi_Lite_maybe_generate_quick_replies_8Render 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 toolLeoAi_Lite_maybe_generate_quick_replies_9Render 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 toolLeoAi_Lite_regenerate_lastRe-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 toolLeoAi_Lite_render_dashboardAggregate 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_respondFetch 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 isLeoAi_Lite_respond_1Fetch 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 isLeoAi_Lite_respond_2Fetch 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 isLeoAi_Lite_respond_3Fetch 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 isLeoAi_Lite_respond_4Fetch 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 isLeoAi_Lite_respond_5Fetch 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 isLeoAi_Lite_respond_6Fetch 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 isLeoAi_Lite_respond_7Fetch 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 isLeoAi_Lite_respond_8Fetch 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 isLeoAi_Lite_run_evalRun 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_leoScore 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_sourcesRun 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_logRender the last 10 flagged (low-confidence) answers as a Markdown table.LeoAi_Lite_view_question_logRender the last 20 logged questions as a Markdown table with totals.LeoAi_Lite_warmup_modelPre-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.
No tool matches.
As the server's own listing gives them. We never call a tool.