Tutorial not working due to deprecated OpenAI moderation model
還沒有人認領這個 Issue。
評估
- 難度
- 1/5
- 預估耗時
- 1 小時以內
- 新手友好度
- 45/100
- Issue 類型
- 文件
- 描述清晰度
- 描述清楚
- 活躍度
- 停滯
- 技術堆疊
- typescript
研究方向
Open the run-pipe tutorial at https://baseai.dev/learn/run-pipe and locate the moderation example using text-moderation-007. Update the tutorial to use omni-moderation-latest, then run the documented npx tsx index.ts example and confirm it no longer requests the deprecated model.
由索引模型根據 Issue 內容生成。
描述
Description
Follow the tutorial, specifically the page https://baseai.dev/learn/run-pipe
Code example
It tries to moderate using text-moderation-007 but the current moderation model is omni-moderation-latest.
Additional context
Error message
npx tsx index.ts
(node:34160) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
/Users/fabiovedovelli/Code/my-ai-project/node_modules/@baseai/core/src/common/errors.ts:75
return new BadRequestError(status, error, message, headers);
^
BadRequestError: 400 Error from OpenAI: 403 Project `proj_yIE96rr2PYpDK55CfxPorTFx` does not have access to model `text-moderation-007`
at Function.generate (/Users/fabiovedovelli/Code/my-ai-project/node_modules/@baseai/core/src/common/errors.ts:75:12)
at Request.handleErrorResponse (/Users/fabiovedovelli/Code/my-ai-project/node_modules/@baseai/core/src/common/request.ts:126:18)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Request.send (/Users/fabiovedovelli/Code/my-ai-project/node_modules/@baseai/core/src/common/request.ts:62:4)
at async Pipe.run (/Users/fabiovedovelli/Code/my-ai-project/node_modules/@baseai/core/src/pipes/pipes.ts:309:18)
at async main (/Users/fabiovedovelli/Code/my-ai-project/index.ts:17:22) {
status: 400,
headers: {
'access-control-allow-origin': '*',
connection: 'keep-alive',
'content-length': '256',
'content-type': 'application/json',
date: 'Wed, 12 Feb 2025 11:24:28 GMT',
env: 'local',
'keep-alive': 'timeout=5',
'lb-powered-by': 'Langbase',
'powered-by': 'BaseAI'
},
request_id: undefined,
error: {
code: 'BAD_REQUEST',
status: 400,
message: 'Error from OpenAI: 403 Project `proj_yIE96rr2PYpDK55CfxPorTFx` does not have access to model `text-moderation-007`',
docs: 'https://langbase.com/docs/api-reference/errors/bad_request'
},
code: 'BAD_REQUEST'
}
Node.js v23.6.1
- 主要語言
- TypeScript
- 星號
- 1.3k
- 分支
- 112
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
CommandCodeAI/BaseAI 的其他 Issue
-
難度 3/5 1-2 天 新手友好度 35/100
CommandCodeAI/BaseAI#177 ·
-
難度 4/5 3-5 天 新手友好度 25/100
CommandCodeAI/BaseAI#162 ·
-
難度 2/5 1-3 小時 新手友好度 35/100
CommandCodeAI/BaseAI#155 · 3 則留言 · 1 個 reaction ·
-
難度 2/5 1-3 小時 新手友好度 55/100
CommandCodeAI/BaseAI#154 ·
-
Unable to deploy 未關閉
難度 4/5 3-5 天 新手友好度 25/100
CommandCodeAI/BaseAI#153 ·
查看 CommandCodeAI/BaseAI 的全部 Issue
相似的 Issue
-
clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
難度 2/5 1-3 小時 新手友好度 88/100
-
難度 2/5 1-3 小時 新手友好度 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
難度 2/5 1-3 小時 新手友好度 68/100
supermomonga/zcode-acp#24 ·
-
難度 2/5 1-3 小時 新手友好度 76/100
growthbook/growthbook#7100 ·
-
triage
難度 1/5 1-3 小時 新手友好度 88/100