Skip to main content

using-model-endpoint

Call a registered model endpoint over its native HTTP API from the endpoint's scoped inference kernel (BASE_URL preloaded). Load once a task needs predictions from a registered model endpoint.

跳到安装

来源信息

仓库
HughYau/AcademicForge
最近来源活动
2026年7月2日 10:54
检测到的 SKILL.md 语言
英语
星标
2,549
分支
152

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
5 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
using-model-endpoint
description
Call a registered model endpoint over its native HTTP API from the endpoint's scoped inference kernel (BASE_URL preloaded). Load once a task needs predictions from a registered model endpoint.
license
Apache-2.0
You are a **pure HTTP client of `BASE_URL`**. Each registered model endpoint gets its own inference kernel — a Python REPL whose network egress is scoped to exactly that endpoint — reached via `compute_provider({'provider': '<slug>', 'code': '…'})` (`<slug>` from `list_compute`, without the `infer:` prefix). - `BASE_URL` is preloaded (as a Python variable AND as `os.environ["BASE_URL"]`) — build request URLs from it, never hardcode hosts/ports. Call the model's **native API** with `httpx` (preinstalled) or `requests`; request shapes live in the provider's own runbook skill (the registration's `skillName`). - Hosted endpoints: send `Authorization: Bearer $INFER_API_KEY` (always the canonical env name when a credential is delivered; the credential's own name is usually aliased too). Local endpoints need no auth header. - Requests ride the sandbox HTTP proxy (`HTTP_PROXY`/`HTTPS_PROXY` are set) — don't disable it (e.g. `trust_env=False`) or the endpoint is unreachable. - No job lifecycle here (no submit/harvest) — direct request/response only. **Managed endpoints** (entries with `managed: true` / a `location` field in `list_compute`): their lifecycle — daemon-owned start/stop, registration, `free_port()`/`register()` — lives in the **`managed-model-endpoints`** skill. Cells against them are still just HTTP calls to `BASE_URL`; the daemon brings the model up on demand (a cold start streams its progress into your cell and can take minutes).
在 GitHub 查看