-
Notifications
You must be signed in to change notification settings - Fork 0
Python Runtime
Mike edited this page May 28, 2026
·
1 revision
Runtime управляет набором units: устанавливает artifacts, запускает backend,
открывает dashboard/browser window, дает local API URL и convenience methods.
| Свойство | Описание |
|---|---|
runtime.id |
runtime registry id |
runtime.port |
порт bridge |
runtime.base_url |
http://127.0.0.1:<port> |
runtime.url |
http://127.0.0.1:<port>/v1 |
runtime.bridge |
Bridge | NativeBridge | None |
runtime.mode |
native или web
|
runtime.installed |
локальный флаг install |
runtime.running |
локальный флаг run |
runtime.unit_requests |
payload всех units |
| Метод | Зачем нужен | Ключевые параметры |
|---|---|---|
add_unit(unit, activate=True) |
добавить Unit/UnitRequest |
activate запускает unit в running runtime |
remove_unit(unit_id, delete_cache=False) |
убрать unit |
unit_id, delete_cache
|
configure_unit(unit_id, reasoning=None, options=None) |
hot-update unit options |
reasoning, options
|
set_reasoning(unit_id, enabled) |
shortcut reasoning update | enabled |
unit_status(unit_id) |
статус одного unit | unit_id |
units(as_dict=False, state=False) |
configured или backend units |
as_dict, state
|
models() |
backend model states или configured units | - |
install(port=None) |
bridge + engine/model install | port |
run(port=None) |
запустить все configured units | port |
stop() |
остановить models и закрыть owned windows | - |
hibernate() |
выгрузить active models | - |
heatup() |
запустить и warmup | - |
status() |
полный runtime/bridge status | - |
health() |
bridge health | - |
logs(limit=200) |
логи bridge/backend | limit |
invoke(endpoint, payload, timeout=None) |
низкоуровневый invoke |
endpoint, payload, timeout
|
client(api_key="xlocllm", **kwargs) |
OpenAI client bound to runtime.url
|
api_key, kwargs OpenAI |
chat(prompt=None, messages=None, model=None, use_rag=None, **params) |
chat.completions shortcut |
prompt, messages, model, use_rag
|
embed(input, model=None) |
embeddings shortcut |
input, model
|
open() |
dashboard/browser window | - |
chatui(model=None, session="default", use_rag=True, open_browser=True, block=True, width=760, height=860) |
отдельное chat UI window |
model, session, use_rag, window options |
close() |
shutdown bridge и registry state | - |
wait_ready(timeout=None, require_browser=False) |
дождаться bridge/browser |
timeout, require_browser
|
Runtime поддерживает with: при выходе закрывается owned bridge/window, если runtime сам их поднял.
- xlocllm
- Quickstart
- About
- Functions Python
- Functions TypeScript
- Use cases
- Examples Python
- Examples TypeScript
- Shared GPU mode
-
Models catalog
- Models The best
- Models Full model list
- Models Use your model
- For native mode
- Models Native LLM tiny small
- Models Native LLM medium
- Models Native LLM large
- Models Native embedding
- Models Native reranker
- Models Native translator
- Models Native tts
- Models Native vlm
- Models Native asr
- Models Native ocr
- Models Native image-classification
- Models Native object-detection
- Models Native image-segmentation
- Models Native depth-estimation
- Models Native document-layout
- Models Native table-detection
- Models Native document-qa
- Models Native language-id
- Models Native audio-classification
- Models Native text-classification
- Models Native ner
- Models Native zero-shot-text
- Models Native summarization
- Models Native text2text
- Models Native code
- For webgpu mode
- For web mode
- Models Web LLM
- Models Web embedding
- Models Web reranker
- Models Web translator
- Models Web tts
- Models Web vlm
- Models Web asr
- Models Web ocr
- Models Web image-classification
- Models Web object-detection
- Models Web image-segmentation
- Models Web depth-estimation
- Models Web document-layout
- Models Web table-detection
- Models Web document-qa
- Models Web zero-shot-image
- Models Web language-id
- Models Web audio-classification
- Models Web text-classification
- Models Web ner
- Models Web zero-shot-text
- Models Web summarization
- Models Web text2text
- Models Web code
- Dev