Skip to content

Python Additional Invoke OpenAI

Mike edited this page May 28, 2026 · 1 revision

Additional: Invoke and OpenAI

OpenAI-compatible endpoints

Endpoint Назначение
GET /v1/models список моделей
POST /v1/chat/completions chat completions
POST /v1/chat/completions with stream=True streaming chat completions
POST /v1/responses Responses-like text output
POST /v1/embeddings embeddings

Direct invoke endpoints

Используйте runtime.invoke(endpoint, payload) или bridge.invoke(endpoint, payload).

Endpoint Unit Required input Return shape
chat.completions, chat LLM messages or prompt {content, raw?}
responses LLM input response-like text content
embeddings, embedding embedding input {embeddings}
rerank, reranker reranker query, documents {results} sorted by score
translate, translator translator text/input, optional languages translation output
tts tts text/input audio-like result
image.classify, image-classification image-classification image/input/url {labels, raw}
image.detect, object-detection object-detection image/input/url {boxes, raw}
image.segment, image-segmentation image-segmentation image/input/url {segments, raw}
depth, depth-estimation depth-estimation image/input/url {depth, raw}
image-to-text, vlm vlm image/input/url {text, raw}
asr, speech-to-text asr audio/input/url {text, chunks?, raw}
zero-shot-image zero-shot-image image, labels {labels, raw}
language-id language-id audio/input/url {labels, raw}
audio.classify, audio-classification audio-classification audio/input/url {labels, raw}
ocr ocr image/input/url {text, raw}
document-layout document-layout image/input/url {boxes, raw}
table-detection table-detection image/input/url {boxes, raw}
document-qa document-qa image, question/query {answers, raw}
text.classify, text-classification text-classification text/input {labels, raw}
ner, token-classification ner text/input {entities, raw}
zero-shot-text, zero-shot-classification zero-shot-text text, labels {labels, raw}
summarization, summarize summarization text/input {summary, raw}
text2text, text2text-generation text2text text/input {text, raw}
code, code.embed code text/input {features, raw}
vector.add/search/delete/clear/stats vectorstorage unit + operation payload storage result
rag.add/search/delete/clear/reindex/stats RAG unit + operation payload RAG result
onnx.predict onnx/custom inputs custom ONNX output

Convenience wrappers

Wrapper Описание
runtime.chat(...) shortcut для chat.completions
runtime.embed(...) shortcut для embeddings
runtime.client(...) OpenAI client, требует optional openai package
unit.invoke(...) single-unit runtime invoke

Clone this wiki locally