BabelDOC icon indicating copy to clipboard operation
BabelDOC copied to clipboard

feat: Allow custom prompts

Open awwaawwa opened this issue 8 months ago • 2 comments

awwaawwa avatar Apr 19 '25 19:04 awwaawwa

附议,这个对翻译很重要呀

wjy1010111 avatar May 08 '25 09:05 wjy1010111

https://github.com/funstory-ai/BabelDOC/pull/344 added a --custom-system-prompt "/no_think You are a professional, authentic machine translation engine." which is mainly used to add the /no_think instruction of Qwen 3 in the prompt.

Technically, this thing will only replace the first sentence of the prompt generated by BabelDOC, nothing more.

Image

awwaawwa avatar May 08 '25 16:05 awwaawwa

QWEN3 使用--custom-system-prompt "/no_think" 还是不工作。

\uv\tools\babeldoc\Lib\site-packages\op enai_base_client.py", line 1034, in request raise self._make_status_error_from_response(err.response) from None openai.BadRequestError: Error code: 400 - {'error': {'code': 'invalid_parameter_error', 'message': 'parameter.enable_thinking must be set to false for non-streaming calls', 'param': None, 'type': 'invalid_request_error'}, 'request_id': 'ea479305-a4c4-463a-99b0-20bb84742998'}

B-le-B avatar May 29 '25 23:05 B-le-B

QWEN3 使用--custom-system-prompt "/no_think" 还是不工作。

\uv\tools\babeldoc\Lib\site-packages\op enai_base_client.py", line 1034, in request raise self._make_status_error_from_response(err.response) from None openai.BadRequestError: Error code: 400 - {'error': {'code': 'invalid_parameter_error', 'message': 'parameter.enable_thinking must be set to false for non-streaming calls', 'param': None, 'type': 'invalid_request_error'}, 'request_id': 'ea479305-a4c4-463a-99b0-20bb84742998'}

This CLI is mainly for debugging purposes. Although end users can use this CLI to translate files, we do not provide any technical support for this purpose.

awwaawwa avatar May 30 '25 07:05 awwaawwa