透過在 Steam 創意工坊安裝官方 Mod,可以使用部分外部 API。 請自行取得 API 金鑰等認證資訊。
預設支援的 API (1.0.1):
- Google Cloud Vision (DOCUMENT_TEXT_DETECTION)
- Microsoft Azure AI Vision (Read API)
- *OpenAI Vision Sample (gpt4o-mini)
* 作為使用者擴充的範例附帶
預設支援的 API (1.0.1):
- DeepL API
- Microsoft Azure AI Translator
- *Google App Script Sample (相容 VRHandsFrame v1)
- *LibreTranslate
* 作為使用者擴充的範例附帶
安裝 Mod 後,設定畫面側邊欄底部會顯示相應項目。 將滑動條設為 ON,即可使用 Mod 取代內建功能。 如果未顯示 Mods 項目,請重新啟動 VRHandsFrame 或 Steam 用戶端。

如果想使用官方 Mod 不支援的 API,有以下兩種方法:
Extension Object 的新 json 檔案 (推薦)user_extension.json 檔案Extension Object 是用於定義使用者擴充的 API URL 端點、請求/回應參數等資訊的物件。
user_extension.json 是包含若干 Extension Object 範例的檔案。
從 Steam 創意工坊安裝 Mod 後,應用程式啟動時會在以下目錄產生所需的 user_extension.json 和 manifest.json 檔案:
../SteamLibrary/steamapp/common/VRHandsFrame/Mods/VisionBaseMod/
../SteamLibrary/steamapp/common/VRHandsFrame/Mods/TranslationBaseMod/
請在此位置新增描述 Extension Object 的 json 檔案。
檔案名稱可以任意指定,但 Extension Object 中 "name" 鍵的值在每個 Mod 內必須唯一。
** 請勿刪除原有的 user_extension.json 和 manifest.json 檔案! 這些檔案是必需的。 **
| name required | string 擴充名稱
|
| url required | string API 請求的目標 URL |
required | Key (object) 作為 API 請求金鑰的認證資訊。
|
object API 請求的可選 HTTP 標頭 | |
required | Array of APIRequestObject (object) non-empty API 請求所需的參數
|
required | APIResponseObject (object) API 回應期望的參數 |
{- "name": "OpenAI Vision Sample (gpt-4o-mini)",
- "key": {
- "type": "bearer",
- "value": ""
}, - "headers": {
- "Content-Type": "application/json"
}, - "request": [
- {
- "type": "json",
- "params": {
- "model": "gpt-4o-mini",
- "messages": [
- {
- "role": "user",
- "content": [
- {
- "type": "text",
- "text": "What is in this image?"
}, - {
- "type": "image_url",
- "image_url": {
- "url": "data:image/png;base64,$image_data"
}
}
]
}
], - "max_tokens": 1024
}
}
], - "response": {
- "type": "json",
- "jsonKey": "choices[0].message.content"
}
}| type required | string Enum: "json" "form" "query" 參數類型
query 參數物件可與 JSON 或表單資料組合使用。 此時請作為陣列元素分別定義。 |
| params required | object API 請求參數 請根據要使用的 API 的規格設定參數。 以下字串用作佔位符:
|
{- "type": "json",
- "params": {
- "image": "$image_png"
}
}| type required | string Value: "json" |
| jsonKey required | string 存放要接收的文字資訊的 Json 鍵
|
{- "type": "json",
- "jsonKey": "choices[0].message.content"
}| description required | string Mod 名稱 |
| version required | string Mod 版本 |
required | Array of ExtensionObject (object) >= 0 items 使用者擴充定義 |
{- "description": "Vision User Extension",
- "version": "1.0.1",
- "extensions": [
- {
- "name": "OpenAI Vision Sample (gpt-4o-mini)",
- "key": {
- "type": "bearer",
- "value": ""
}, - "headers": {
- "Content-Type": "application/json"
}, - "request": [
- {
- "type": "json",
- "params": {
- "model": "gpt-4o-mini",
- "messages": [
- {
- "role": "user",
- "content": [
- {
- "type": "text",
- "text": "What is in this image?"
}, - {
- "type": "image_url",
- "image_url": {
- "url": "data:image/png;base64,$image_data"
}
}
]
}
], - "max_tokens": 1024
}
}
], - "response": {
- "type": "json",
- "jsonKey": "choices[0].message.content"
}
}
]
}