fix: translation hooks and custom api doc

This commit is contained in:
Gabe
2025-11-03 18:42:47 +08:00
parent fd014a1d34
commit 4b19902e5c
4 changed files with 40 additions and 4 deletions

View File

@@ -694,7 +694,13 @@ export const genTransReq = async ({ reqHook, ...args }) => {
try {
interpreter.run(`exports.reqHook = ${reqHook}`);
const hookResult = await interpreter.exports.reqHook(
{ ...args, defaultSystemPrompt, defaultSubtitlePrompt },
{
...args,
defaultSystemPrompt,
defaultSubtitlePrompt,
defaultNobatchPrompt,
defaultNobatchUserPrompt,
},
{
url,
body,