Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PrismML-Eng/Bonsai-demo
/ functions
Functions
83 in github.com/PrismML-Eng/Bonsai-demo
⨍
Functions
83
◇
Types & classes
18
↓ 8 callers
Function
log
(msg)
scripts/openwebui/seed_openwebui.py:99
↓ 8 callers
Method
request
(self, method, path, payload=None, timeout=15)
scripts/openwebui/seed_openwebui.py:108
↓ 5 callers
Method
read
(self, limit)
tests/test_tool_web_fetch.py:24
↓ 4 callers
Method
_fetch_with_response
(self, response, chat_id="chat-1")
tests/test_tool_web_fetch.py:47
↓ 4 callers
Function
_load_seed_module
()
tests/test_seed_openwebui.py:12
↓ 3 callers
Method
query_database
Run a read-only SQL query against the PrismML demo sales database using SQLite syntax. The database contains customers, products, ord
scripts/openwebui/tool_sql.py:39
↓ 2 callers
Method
_break
(self)
scripts/openwebui/tool_web_fetch.py:75
↓ 2 callers
Function
_normalize_text
(parts)
scripts/openwebui/tool_web_fetch.py:156
↓ 1 callers
Method
__init__
(self, location)
scripts/openwebui/tool_web_fetch.py:206
↓ 1 callers
Function
_attach_artifacts
Attach generated images using Native-compatible Open WebUI file events.
scripts/openwebui/tool_code_interpreter.py:85
↓ 1 callers
Function
_check_url_public
Return an error string if the URL is unsafe to fetch, else None.
scripts/openwebui/tool_web_fetch.py:231
↓ 1 callers
Function
_clean_stderr
Remove ANSI styling and harmless progress bars from Jupyter stderr.
scripts/openwebui/tool_code_interpreter.py:35
↓ 1 callers
Function
_error_summary
(stderr: str)
scripts/openwebui/tool_code_interpreter.py:48
↓ 1 callers
Function
_extract_artifact_markdown
Extract only uploaded image markdown produced by the builtin tool.
scripts/openwebui/tool_code_interpreter.py:80
↓ 1 callers
Function
_extract_readable_html
(source: str)
scripts/openwebui/tool_web_fetch.py:163
↓ 1 callers
Function
_finish_fetch
(chat_id: str, success: bool)
scripts/openwebui/tool_web_fetch.py:194
↓ 1 callers
Function
_get
(url: str)
scripts/openwebui/tool_weather.py:11
↓ 1 callers
Function
_has_execution_error
(stderr: str)
scripts/openwebui/tool_code_interpreter.py:56
↓ 1 callers
Function
_is_public_ip
(ip_str: str)
scripts/openwebui/tool_web_fetch.py:218
↓ 1 callers
Function
_model_params
Params for the seeded model record. The 27B (the launch model) uses the reference precise-task thinking-mode sampling. Older sizes (8B/4B/1.7B)
scripts/openwebui/seed_openwebui.py:199
↓ 1 callers
Function
_normalize_execution
Distinguish clean success, useful partial output, and genuine failure.
scripts/openwebui/tool_code_interpreter.py:118
↓ 1 callers
Function
_read_capped
Read the body, capping the decompressed size to guard against zip bombs.
scripts/openwebui/tool_web_fetch.py:257
↓ 1 callers
Function
_reserve_fetch
Reserve a quota slot so parallel tool calls cannot exceed the cap.
scripts/openwebui/tool_web_fetch.py:183
↓ 1 callers
Function
_suggested_fix
Return a targeted correction for common, confidently identified errors.
scripts/openwebui/tool_code_interpreter.py:67
↓ 1 callers
Function
_truncate
(text: str, limit: int)
scripts/openwebui/tool_code_interpreter.py:28
↓ 1 callers
Function
_without_leading_comments
Return SQL after whitespace and leading -- / /* */ comments.
scripts/openwebui/tool_sql.py:15
↓ 1 callers
Function
cleanup_stale
Delete records this script created in past runs for models that no backend currently serves. Never touches records made by hand.
scripts/openwebui/seed_openwebui.py:323
↓ 1 callers
Function
display_name
Friendly UI name: strip paths and .gguf, tag the backend.
scripts/openwebui/seed_openwebui.py:191
↓ 1 callers
Function
fetch_backend_model_ids
Ask an OpenAI-compatible backend which model ids it serves. Returns (bonsai_ids, other_ids) - some backends (mlx-vlm) also list helper models
scripts/openwebui/seed_openwebui.py:143
↓ 1 callers
Method
fetch_url
Fetch a web page and return its readable text content. Use this to open links the user provides or URLs found via web search.
scripts/openwebui/tool_web_fetch.py:279
↓ 1 callers
Method
get_content_charset
(self)
tests/test_tool_web_fetch.py:15
↓ 1 callers
Method
handle_endtag
(self, tag)
scripts/openwebui/tool_web_fetch.py:112
↓ 1 callers
Method
handle_starttag
(self, tag, attrs)
scripts/openwebui/tool_web_fetch.py:80
↓ 1 callers
Function
hide_model
Soft-disable a helper model so it doesn't clutter the picker.
scripts/openwebui/seed_openwebui.py:302
↓ 1 callers
Function
main
()
scripts/mlx_generate.py:50
↓ 1 callers
Function
main
()
scripts/openwebui/seed_openwebui.py:345
↓ 1 callers
Method
open
(self, request, timeout)
tests/test_tool_web_fetch.py:38
↓ 1 callers
Function
price
(pid, day)
scripts/openwebui/make_demo_db.py:84
↓ 1 callers
Function
seed_model
(api, model_id, vision, native_tools, backend)
scripts/openwebui/seed_openwebui.py:210
↓ 1 callers
Function
seed_stream_filter
Install the global stream filter that works around an Open WebUI bug: mlx_vlm.server sends "timings": null in every SSE chunk and Open WebUI's
scripts/openwebui/seed_openwebui.py:263
↓ 1 callers
Function
seed_tool
(api, tool_id, name, filename, description)
scripts/openwebui/seed_openwebui.py:159
↓ 1 callers
Method
signin
With WEBUI_AUTH=false the frontend signs in with empty credentials and receives the auto-admin's session token; do the same.
scripts/openwebui/seed_openwebui.py:121
↓ 1 callers
Function
wait_for_webui
(api, tries=60)
scripts/openwebui/seed_openwebui.py:133
Method
__enter__
(self)
tests/test_tool_web_fetch.py:27
Method
__exit__
(self, exc_type, exc, tb)
tests/test_tool_web_fetch.py:30
Method
__init__
(self, base)
scripts/openwebui/seed_openwebui.py:104
Method
__init__
(self)
scripts/openwebui/tool_web_fetch.py:59
Method
__init__
(self, body, content_type="text/html; charset=utf-8")
tests/test_tool_web_fetch.py:20
Method
__init__
(self, response)
tests/test_tool_web_fetch.py:35
Method
__init__
(self)
tests/test_seed_openwebui.py:21
Method
emitter
(event)
tests/test_tool_code_interpreter.py:66
Method
execute_code
Execute Python in a fresh Jupyter kernel. Make each call self-contained. Open WebUI attaches displayed plots and generated images to
scripts/openwebui/tool_code_interpreter.py:150
Method
get_weather
Get current weather and a daily forecast for a city or place name. :param location: City or place name, e.g. "Lisbon" or "Maui, Hawa
scripts/openwebui/tool_weather.py:18
Method
handle_data
(self, data)
scripts/openwebui/tool_web_fetch.py:135
Method
handle_startendtag
(self, tag, attrs)
scripts/openwebui/tool_web_fetch.py:131
Method
redirect_request
(self, req, fp, code, msg, headers, newurl)
scripts/openwebui/tool_web_fetch.py:214
Method
request
(self, method, path, payload=None, timeout=15)
tests/test_seed_openwebui.py:24
Method
setUp
(self)
tests/test_tool_sql.py:29
Method
setUp
(self)
tests/test_tool_web_fetch.py:43
Method
stream
(self, event: dict)
scripts/openwebui/filter_mlx_stream.py:9
Method
tearDown
(self)
tests/test_tool_sql.py:39
Method
test_27b_uses_precise_thinking_sampling
(self)
tests/test_seed_openwebui.py:79
Method
test_binary_content_is_rejected_without_consuming_quota
(self)
tests/test_tool_web_fetch.py:125
Method
test_description_names_dialect_and_common_date_trap
(self)
tests/test_tool_sql.py:17
Method
test_generated_image_has_model_fallback_without_event_emitter
(self)
tests/test_tool_code_interpreter.py:85
Method
test_generated_image_is_attached_with_native_compatible_file_event
(self)
tests/test_tool_code_interpreter.py:63
Method
test_large_detailed_results_are_withheld
(self)
tests/test_tool_sql.py:52
Method
test_leading_line_and_block_comments_are_allowed
(self)
tests/test_tool_sql.py:43
Method
test_model_disables_openwebui_citation_rewrite
(self)
tests/test_seed_openwebui.py:30
Method
test_navigation_only_page_is_rejected_and_does_not_consume_quota
(self)
tests/test_tool_web_fetch.py:94
Method
test_non_image_result_is_preserved
(self)
tests/test_tool_code_interpreter.py:99
Method
test_nonfatal_warning_is_preserved_without_marking_failure
(self)
tests/test_tool_code_interpreter.py:115
Method
test_prefers_article_and_returns_source_metadata
(self)
tests/test_tool_web_fetch.py:60
Method
test_progress_only_stderr_is_clean_success
(self)
tests/test_tool_code_interpreter.py:15
Method
test_prompt_is_generic_bounded_and_date_aware
(self)
tests/test_seed_openwebui.py:49
Method
test_quota_reservations_include_parallel_inflight_calls
(self)
tests/test_tool_web_fetch.py:116
Method
test_repo_owned_code_tool_is_attached_when_jupyter_is_on
(self)
tests/test_seed_openwebui.py:72
Method
test_small_results_include_completeness_marker
(self)
tests/test_tool_sql.py:61
Method
test_tool_description_is_generic_and_allows_api_discovery
(self)
tests/test_tool_code_interpreter.py:53
Method
test_traceback_with_image_is_partial_success
(self)
tests/test_tool_code_interpreter.py:42
Method
test_traceback_without_result_is_compact_error
(self)
tests/test_tool_code_interpreter.py:24
Method
test_unreadable_page_releases_slot_for_a_retry
(self)
tests/test_tool_web_fetch.py:106
Method
test_unrelated_error_does_not_receive_yfinance_advice
(self)
tests/test_tool_code_interpreter.py:105