Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 65 additions & 65 deletions catalog/listing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,69 +22,69 @@ locales:

Inference には GPU ノードが必要です。ブランチごとに NVIDIA GPU を 1 基使うため、本番とステージングの両方を動かすと 2 基になります。必要な数はインストール前のダイアログに表示されます。モデルはアプリに同梱されていてインターネットに接続せずに動くので、プロンプトと応答はプロジェクトの中で処理されます。Inference に専用の画面はなく、インストール・更新・削除はマーケットプレイスから行います。
highlights:
- screenshot: marketplace-detail
locales:
en:
title: OpenAI-compatible chat API
body: Existing code for OpenAI-compatible APIs works with /v1/chat/completions and /v1/models. Replies can be streamed, and the model name can be omitted.
ja:
title: OpenAI 互換のチャット API
body: OpenAI 互換の API 向けに書いたコードを、そのまま /v1/chat/completions と /v1/models に向けられます。応答はストリーミングでも受け取れ、モデル名は省略できます。
- screenshot: install-gpu
locales:
en:
title: See the GPU count before installing
body: The install dialog lists the NVIDIA GPUs each branch needs and the total, so you know what the Project must provide before the app starts.
ja:
title: 必要な GPU をインストール前に確認
body: インストールのダイアログに、ブランチごとに必要な NVIDIA GPU の数と合計が表示されます。アプリを動かす前に、プロジェクトに用意すべき数が分かります。
- screenshot: install-production-only
locales:
en:
title: One GPU with production only
body: Staging runs as a separate copy with its own GPU. Choose production only to run a single copy on one GPU.
ja:
title: 本番だけなら GPU は 1 基
body: ステージングは専用の GPU を使う別のコピーとして動きます。「本番のみ」を選ぶと、1 基の GPU で 1 つだけ動かせます。
- screenshot: version-select
locales:
en:
title: Pin a version or follow updates
body: Pick the version at install time and either keep it pinned or let new versions in the same release line install automatically.
ja:
title: バージョンは固定も自動更新も選べます
body: インストール時にバージョンを選び、そのまま固定するか、同じリリースラインの新しいバージョンを自動で入れるかを決められます。
- screenshot: catalog-card
locales:
en:
title: Stays inside the Project
body: The model ships with the app and runs without internet access. With AI Gateway installed, chat requests can be routed to Inference under the Project AI policy.
ja:
title: プロジェクトの中で完結
body: モデルはアプリに同梱されており、インターネットに接続せずに動きます。AI Gateway を入れていれば、プロジェクトの AI ポリシーに沿ってチャットのリクエストを Inference に振り分けられます。
- screenshot: marketplace-detail
locales:
en:
title: OpenAI-compatible chat API
body: Existing code for OpenAI-compatible APIs works with /v1/chat/completions and /v1/models. Replies can be streamed, and the model name can be omitted.
ja:
title: OpenAI 互換のチャット API
body: OpenAI 互換の API 向けに書いたコードを、そのまま /v1/chat/completions と /v1/models に向けられます。応答はストリーミングでも受け取れ、モデル名は省略できます。
- screenshot: install-gpu
locales:
en:
title: See the GPU count before installing
body: The install dialog lists the NVIDIA GPUs each branch needs and the total, so you know what the Project must provide before the app starts.
ja:
title: 必要な GPU をインストール前に確認
body: インストールのダイアログに、ブランチごとに必要な NVIDIA GPU の数と合計が表示されます。アプリを動かす前に、プロジェクトに用意すべき数が分かります。
- screenshot: install-production-only
locales:
en:
title: One GPU with production only
body: Staging runs as a separate copy with its own GPU. Choose production only to run a single copy on one GPU.
ja:
title: 本番だけなら GPU は 1 基
body: ステージングは専用の GPU を使う別のコピーとして動きます。「本番のみ」を選ぶと、1 基の GPU で 1 つだけ動かせます。
- screenshot: version-select
locales:
en:
title: Pin a version or follow updates
body: Pick the version at install time and either keep it pinned or let new versions in the same release line install automatically.
ja:
title: バージョンは固定も自動更新も選べます
body: インストール時にバージョンを選び、そのまま固定するか、同じリリースラインの新しいバージョンを自動で入れるかを決められます。
- screenshot: catalog-card
locales:
en:
title: Stays inside the Project
body: The model ships with the app and runs without internet access. With AI Gateway installed, chat requests can be routed to Inference under the Project AI policy.
ja:
title: プロジェクトの中で完結
body: モデルはアプリに同梱されており、インターネットに接続せずに動きます。AI Gateway を入れていれば、プロジェクトの AI ポリシーに沿ってチャットのリクエストを Inference に振り分けられます。
screenshots:
- name: marketplace-detail
file: marketplace-detail.webp
alt:
en: "Dashboard Marketplace page for Inference: the Assist badge, the description of OpenAI-compatible chat completions with Qwen2.5-0.5B-Instruct that requires a GPU, an Install button, and versions 0.1.0 and 0.2.0 (default)."
ja: "ダッシュボードのマーケットプレイスにある Inference のページ。Assist のバッジ、Qwen2.5-0.5B-Instruct による OpenAI 互換のチャット応答で GPU が必要という説明、インストールボタン、バージョン 0.1.0 と 0.2.0(既定)が並んでいます。"
- name: install-gpu
file: install-gpu.webp
alt:
en: "Install dialog for Inference with version 0.2.0, pinned updates and production plus staging selected; the accelerator table shows 1 NVIDIA GPU for production, 1 for staging, 2 in total."
ja: "Inference のインストールダイアログ。バージョン 0.2.0、バージョンを固定、本番とステージングを選んだ状態で、アクセラレータ欄に本番 1 NVIDIA GPU、ステージング 1 NVIDIA GPU、合計 2 NVIDIA GPU と表示されています。"
- name: install-production-only
file: install-production-only.webp
alt:
en: "The same install dialog with production only selected; the accelerator table now shows 1 NVIDIA GPU for production and 1 in total."
ja: "同じインストールダイアログで「本番のみ」を選んだ状態。アクセラレータ欄は本番 1 NVIDIA GPU、合計 1 NVIDIA GPU に変わっています。"
- name: version-select
file: version-select.webp
alt:
en: "Version menu open in the install dialog, listing 0.1.0 and 0.2.0 (recommended) with 0.2.0 checked, above the pinned-version and branch options."
ja: "インストールダイアログでバージョンの一覧を開いた状態。0.1.0 と 0.2.0(推奨)が並び、0.2.0 にチェックが付いています。下にはバージョン固定とブランチの選択肢があります。"
- name: catalog-card
file: catalog-card.webp
alt:
en: "Catalog section of the Marketplace: AI Gateway and Embedding marked as installed, and the Inference card showing version 0.2.0, follow or pin updates, and an Install button."
ja: "マーケットプレイスのカタログ欄。AI Gateway と Embedding はインストール済みで、Inference のカードにはバージョン 0.2.0、更新方法(自動で更新 / バージョンを固定)、インストールボタンが表示されています。"
- name: marketplace-detail
file: marketplace-detail.webp
alt:
en: 'Dashboard Marketplace page for Inference: the Assist badge, the description of OpenAI-compatible chat completions with Qwen2.5-0.5B-Instruct that requires a GPU, an Install button, and versions 0.1.0 and 0.2.0 (default).'
ja: マーケットプレイスの Inference ページ。説明文、インストールボタン、更新の選択肢、バージョン 0.1.0 と 0.2.0(既定)が並んでいます。
- name: install-gpu
file: install-gpu.webp
alt:
en: Install dialog for Inference with version 0.2.0, pinned updates and production plus staging selected; the accelerator table shows 1 NVIDIA GPU for production, 1 for staging, 2 in total.
ja: Inference のインストールダイアログ。バージョン 0.2.0、バージョンを固定、本番とステージングを選んだ状態で、アクセラレータ欄に本番 1 NVIDIA GPU、ステージング 1 NVIDIA GPU、合計 2 NVIDIA GPU と表示されています。
- name: install-production-only
file: install-production-only.webp
alt:
en: The same install dialog with production only selected; the accelerator table now shows 1 NVIDIA GPU for production and 1 in total.
ja: 同じインストールダイアログで「本番のみ」を選んだ状態。アクセラレータ欄は本番 1 NVIDIA GPU、合計 1 NVIDIA GPU に変わっています。
- name: version-select
file: version-select.webp
alt:
en: Version menu open in the install dialog, listing 0.1.0 and 0.2.0 (recommended) with 0.2.0 checked, above the pinned-version and branch options.
ja: インストールダイアログでバージョンの一覧を開いた状態。0.1.0 と 0.2.0(推奨)が並び、0.2.0 にチェックが付いています。下にはバージョン固定とブランチの選択肢があります。
- name: catalog-card
file: catalog-card.webp
alt:
en: 'Catalog section of the Marketplace: AI Gateway and Embedding marked as installed, and the Inference card showing version 0.2.0, follow or pin updates, and an Install button.'
ja: マーケットプレイスのカタログ欄。AI Gateway と Embedding はインストール済みで、Inference のカードにはバージョン 0.2.0、更新方法(自動で更新 / バージョンを固定)、インストールボタンが表示されています。
9 changes: 5 additions & 4 deletions hack/catalog-listing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ const localeTag = /^[a-z]{2,3}$/
const dnsLabel = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/
const versionName = /^[A-Za-z0-9][A-Za-z0-9_.-]*$/

// Limits are UTF-8 bytes, as the Cloud store and the CRD measure them.
function bound(value: string | undefined, max: number, what: string): void {
if (value !== undefined && value.length > max) throw new Error(`${what} exceeds ${max} characters`)
if (value !== undefined && Buffer.byteLength(value) > max) throw new Error(`${what} exceeds ${max} UTF-8 bytes`)
}

function localizedText(text: Record<string, string> | undefined, max: number, what: string): void {
Expand All @@ -70,7 +71,7 @@ function localizedText(text: Record<string, string> | undefined, max: number, wh
if (Object.keys(text).length > 16) throw new Error(`${what} has more than 16 locales`)
for (const [tag, value] of Object.entries(text)) {
if (!localeTag.test(tag)) throw new Error(`${what} locale "${tag}" must be a BCP 47 primary tag`)
if (!value || value.length > max) throw new Error(`${what} locale "${tag}" must be 1-${max} characters`)
if (!value || Buffer.byteLength(value) > max) throw new Error(`${what} locale "${tag}" must be 1-${max} UTF-8 bytes`)
}
}

Expand All @@ -95,7 +96,7 @@ export function validateListing(listing: Listing): void {
if (screenshots.length > 8) throw new Error('listing has more than 8 screenshots')
const names = new Set<string>()
for (const media of screenshots) {
if (!dnsLabel.test(media.name) || media.name.length > 63 || names.has(media.name)) {
if (!dnsLabel.test(media.name) || Buffer.byteLength(media.name) > 63 || names.has(media.name)) {
throw new Error(`screenshot name "${media.name}" is invalid or duplicated`)
}
names.add(media.name)
Expand All @@ -113,7 +114,7 @@ export function validateListing(listing: Listing): void {
if (!highlight.locales || !(FALLBACK_LOCALE in highlight.locales)) throw new Error(`highlight ${index} requires the "${FALLBACK_LOCALE}" locale`)
if (Object.keys(highlight.locales).length > 16) throw new Error(`highlight ${index} has more than 16 locales`)
for (const [tag, locale] of Object.entries(highlight.locales)) {
if (!localeTag.test(tag) || !locale.title || locale.title.length > 80 || (locale.body ?? '').length > 400) {
if (!localeTag.test(tag) || !locale.title || Buffer.byteLength(locale.title) > 80 || Buffer.byteLength(locale.body ?? '') > 400) {
throw new Error(`highlight ${index} locale "${tag}" is invalid`)
}
}
Expand Down