OpenAI GPT API for Zotero
发布时间:2026-08-19 | 浏览:5
Instantly share code, notes, and snippets.
Star 11 ( 11 ) You must be signed in to star a gist
Fork 3 ( 3 ) You must be signed in to fork a gist
Embed Select an option Embed Embed this gist in your website. Share Copy sharable link for this gist. Clone via HTTPS Clone using the web URL. No results found Learn more about clone URLs Clone this repository at <script src="https://gist.github.com/GrayXu/f1b72353b4b0493d51d47f0f7498b67b.js"></script>
Embed Embed this gist in your website.
Share Copy sharable link for this gist.
Clone via HTTPS Clone using the web URL.
No results found
Save GrayXu/f1b72353b4b0493d51d47f0f7498b67b to your computer and use it in GitHub Desktop.
Embed Embed this gist in your website.
Share Copy sharable link for this gist.
Clone via HTTPS Clone using the web URL.
No results found
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.
注册成功后,打开 API keys ,创建 密钥 (API Secret Key),如 sk-XXXXXX 。
接口 填写如 https://api.openai.com/v1/chat/completions 的完整调用URL。
模型 填写如 gpt-4o 的模型名。
使用官方接口需要确保你的网络环境可以直连OpenAI。
使用第三方OpenAI兼容接口时,填写规范与上述对齐即可。
Ostrich0119 commented Feb 17, 2025 • edited Loading Uh oh! There was an error while loading. Please reload this page .
There was an error while loading. Please reload this page .
There was an error while loading. Please reload this page .
请问我在模型那一栏中只可以选择3.5turbo,应该如何解决?
curious-energy commented Feb 19, 2025
你好,请问我的zotera7,配置栏这里没有显示“状态”,报错如下,是什么原因呢
刚刚我配置gpt-3.5-turbo的时候,基本认为都填对的,然后一直报这个错误,实在没办法了我就重新填写了一次api-key, 可能复制不认真会导致粘贴错误,然后我先尝试了gpt-4o,这次突然可以运行了,再次改成gpt-3.5-turbo也正常使用。基于以上猜测,一是复制api-key要小心一些,纯文本复制,以防复制到一些隐形的特殊符号,还有可能是界面的保存按键不是每次都生效,多试几次,最后实在不行重启软件试试。
Freeworld1103 commented Feb 20, 2025
为什么我的chat GPT的客户端可以正常使用,可是在zotero里面配置好后就提示“余额不足”呢?? 请大神指教
zzz660 commented Feb 27, 2025
注意是HTTP POST,接口别选错了
luochen1990 commented May 12, 2025
我这 v7 打开怎么是个 JSON 编辑窗口,而且只能填一个字符串,这里的 4个字段要怎么填进一个字符串里呢?
lights6782 commented May 25, 2025
我在沉浸式翻译用的“ https://apipro.maynor1024.live”接口没问题,这里一直不行,配置之后一片空白,按照上面的放方法后面甲加一个chat就可以了“https://apipro.maynor1024.live/v1/chat/completions”
chong-w commented May 29, 2025
有人用vllm部署的qwen3试过吗 一直报连不上服务器
leoduox commented Jun 9, 2025
您好,请问一下后续会考虑一下自定义的本地部署模型想deepseek、Qwen 3这样的可以思考的模型添加一个禁止思考的选项吗,就是直接可以输出翻译的文本而不是先思考一串才回复,现在ollama官方已经添加了接口中的选项,可以控制是否呈现思考的过程,参考原文(在2025.5.30新出的功能): https://ollama.com/blog/thinking
wd021 commented Jul 9, 2025
prompt: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 and remove 。
come share your 🧠 prompts with God Tier Prompts !
GrayXu commented Jul 10, 2025
@AoweiLi zotero7吗
UpsilonYHZ commented Jul 20, 2025 • edited Loading Uh oh! There was an error while loading. Please reload this page .
There was an error while loading. Please reload this page .
There was an error while loading. Please reload this page .
@AoweiLi zotero7吗
感谢插件 同求禁止思考选项,zotero7
gptfortest00 commented Jul 25, 2025
可以使用非语言模型吗?阿里千问出了qwen-mt-turbo翻译模型,感觉翻译效果很好,2元/百万token,但是不是大语言模型 在配置里自定义了参数,不论选中什么内容输出结果都是“中文”两个字
gptfortest00 commented Jul 25, 2025
nvzi2 commented Jul 27, 2025
接千问mtplus的有成功的吗,我咋怎么试都翻译不了,总显示这个Error: HTTP POST https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions failed with status code 400:
tomchangg commented Aug 18, 2025 • edited Loading Uh oh! There was an error while loading. Please reload this page .
There was an error while loading. Please reload this page .
There was an error while loading. Please reload this page .
已解决,温度设为0或者1的整数即可
bonjour-cell commented Aug 30, 2025
您好,请问一下后续会考虑一下自定义的本地部署模型想deepseek、Qwen 3这样的可以思考的模型添加一个禁止思考的选项吗,就是直接可以输出翻译的文本而不是先思考一串才回复,现在ollama官方已经添加了接口中的选项,可以控制是否呈现思考的过程,参考原文(在2025.5.30新出的功能): https://ollama.com/blog/thinking
提示词后面加上 /no_think
Exlog42 commented Sep 2, 2025
phyrevue commented Sep 23, 2025
phyrevue commented Sep 23, 2025
自定义GPT使用newapi中转gemini的api,好像请求中没有英文原文?
改用自带的gemini请求,修改api地址后可以了
lbybingyu-wq commented Nov 6, 2025
congwangsuda commented Nov 13, 2025
要在提示词中提供几个占位符, ${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.
0LeePriest commented Nov 13, 2025
ShevonKuan commented Dec 31, 2025
ztxdcyy commented Feb 3, 2026
prompt: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 and remove 。
非常有用,感谢帮助!!回馈一下我修改的版本:
You are an academic paper translator specializing in large model inference research, please provide a proficient and precise translation from ${langFrom} to ${langTo}. When translating, ensure accuracy and rigor, and retain professional terms in their original form without translation. The text is as follows: ${sourceText} Please provide the translated result without any additional explanation and remove 。
Cdorey commented Mar 24, 2026 • edited Loading Uh oh! There was an error while loading. Please reload this page .
There was an error while loading. Please reload this page .
There was an error while loading. Please reload this page .
摸索出来的自部署的ollama api的比较舒服配置: 接口: http://your-ollama-ip:11434/api/chat 模型:your-model eg. qwen3.5:35b 温度:0.2 提示词(参考前面的老哥):As an academic expert with specialized knowledge, 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. 勾选流式输出 如果是think enable模型,务必增加自定义请求: 参数:think 值:false 请注意有些模型不能真的正确关闭思考模式,比如qwen3:30b,关闭思考只会让它把思考输出到正文里。
YKL0404 commented May 2, 2026
Regarding connecting to deepseekv4-flash and disabling the thinking mode: Click on Custom Request: Parameter Name : thinking Parameter Value :{"type":"disabled"}
lazyn1997 commented May 13, 2026 • edited Loading Uh oh! There was an error while loading. Please reload this page .
There was an error while loading. Please reload this page .
There was an error while loading. Please reload this page .
Regarding connecting to qwen3.6 and disabling the thinking mode: Click on Custom Request: Parameter Name: chat_template_kwargs Parameter Value:{"enable_thinking": false}
wuyifei1008 commented May 22, 2026
henls commented Jun 12, 2026
摸索出来的自部署的ollama api的比较舒服配置: 接口: http://your-ollama-ip:11434/api/chat 模型:your-model eg. qwen3.5:35b 温度:0.2 提示词(参考前面的老哥):As an academic expert with specialized knowledge, 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. 勾选流式输出 如果是think enable模型,务必增加自定义请求: 参数:think 值:false 请注意有些模型不能真的正确关闭思考模式,比如qwen3:30b,关闭思考只会让它把思考输出到正文里。
这种方式可以关闭思考,一定要使用 http://your-ollama-ip:11434/api/chat这个格式的api,chatgpt的v1/chat/completions这种格式控制不了思考
binbla commented Jul 10, 2026
可以添加完全自定义请求的功能吗.有些翻译API并不是通用格式,请求json也不尽相同.例如火山有个翻译模型要这样的请求:
如果携带了像是温度参数他就返回400了 {"error":{"code":"InvalidParameter","message":"The parameter temperature specified in the request are not valid: temperature is not supported by translation model. Request id: 000000","param":"temperature","type":"BadRequest"}}