This gist is for zotero-pdf-translate.
Please ask your question at repo issues for faster responses
请在仓库issue进行提问以获得更快的回复
- Register an account on the OpenAI website.
- After successful registration, go to API keys and create an key, which looks like
sk-XXXXXX. - Fill in the url with the complete URL, such as
https://api.openai.com/v1/chat/completions. - For the model, enter a model name such as
gpt-4o. - When using the official OpenAI API, ensure your network environment allows direct connection to OpenAI .
- When using a 3-party OpenAI compatible API, follow the same format as above.

要在提示词中提供几个占位符,
${langFrom} :源语言(即原文的语言)
${langTo} :目标语言(即希望翻译成的语言)
${sourceText} :输入文本(需要翻译的原始文本内容)
可以参考上面一个兄弟的提示词:
As an academic expert with specialized knowledge in iron and steel making, please provide a proficient and precise translation from ${langFrom} to ${langTo}.
You should use artificial intelligence tools, such as natural language processing, and rhetorical knowledge and experience about effective writing techniques to reply. Make the reply looks like a native speaker.
Some specific terms such as name do not need to be translated.
The text is as follows: ${sourceText}
Please provide the translated result without any additional explanation.