Skip to content

Instantly share code, notes, and snippets.

@GrayXu
Last active April 20, 2024 14:47
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save GrayXu/f1b72353b4b0493d51d47f0f7498b67b to your computer and use it in GitHub Desktop.
Save GrayXu/f1b72353b4b0493d51d47f0f7498b67b to your computer and use it in GitHub Desktop.
Register OpenAI GPT API

This note is for zotero-pdf-translate.

  1. Register an account on the OpenAI website.
  2. After successful registration, open API keys and create an API Secret Key in a format of a 51-character string, such as sk-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.
  3. Finally, enter the generated key into the designated field.

Please ask your question at repo issues for faster responses


  1. OpenAI官网注册账号。
  2. 注册成功之后,打开API keys,创建API Secret Key,格式应为长度为51的字符串,如sk-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  3. 最后填写于密钥处即可。

note: API可能需要代理访问

请在仓库issue进行提问以获得更快的回复

@WhySoSeriousEN
Copy link

@GrayXu 使用自己的的代理api及密钥,显示无法使用,相同的代理api及密钥在zotero gpt插件使用正常

请问你解决这个问题了吗?

同问QAQ

也许是后缀没有带“v1/chat/completions”?我实测第三方接口是可用的

@Masque423
Copy link

image
image
请问zotero 7的插件这里的 Prompt 要填什么,不填的话无法正确翻译,填了我之前用的翻译 Prompt ,还是无法翻译,想知道 zotero 6 的翻译 Prompt 是什么呢

@mo-qc
Copy link

mo-qc commented Sep 19, 2023

image image 请问zotero 7的插件这里的 Prompt 要填什么,不填的话无法正确翻译,填了我之前用的翻译 Prompt ,还是无法翻译,想知道 zotero 6 的翻译 Prompt 是什么呢

As an academic expert with specialized knowledge in various fields, please provide a proficient and precise translation translation from ${langFrom} to ${langTo} of the academic text enclosed in 🔤. It is crucial to maintaining the original phrase or sentence and ensure accuracy while utilizing the appropriate language. The text is as follows: 🔤 ${sourceText} 🔤 Please provide the translated result without any additional explanation and remove 🔤.

@mo-qc
Copy link

mo-qc commented Sep 19, 2023

@GrayXu 使用自己的的代理api及密钥,显示无法使用,相同的代理api及密钥在zotero gpt插件使用正常

请问你解决这个问题了吗?

同问QAQ

确认一下代理地址,加上 v1/chat/completions

@Masque423
Copy link

image image 请问zotero 7的插件这里的 Prompt 要填什么,不填的话无法正确翻译,填了我之前用的翻译 Prompt ,还是无法翻译,想知道 zotero 6 的翻译 Prompt 是什么呢

As an academic expert with specialized knowledge in various fields, please provide a proficient and precise translation translation from ${langFrom} to ${langTo} of the academic text enclosed in 🔤. It is crucial to maintaining the original phrase or sentence and ensure accuracy while utilizing the appropriate language. The text is as follows: 🔤 ${sourceText} 🔤 Please provide the translated result without any additional explanation and remove 🔤.

感谢!!

@anshangtangyuan
Copy link

image

我用的closeai的 接口 怎么还是不能用 还有chatanywhere 这个项目的也不能用

@jacky-ecnuer
Copy link

Error: HTTP POST https://api.openai.com/v1/chat/completions failed with status code 429:

{
"error": {
"message": "You exceeded your current quota, please check your plan and billing details.",
"type": "insufficient_quota",
"param": null,
"code": "insufficient_quota"
}
}
您好,这是啥情况呀密钥没问题,一次只能翻译一个单词

@feizhilee
Copy link

image 我用的closeai的 接口 怎么还是不能用 还有chatanywhere 这个项目的也不能用

看上去您使用的也是 zotero6,为什么我的 6 使用 translate 插件在这个页面无法没有自定义 prompt 的地方呢

@T4b3
Copy link

T4b3 commented Oct 16, 2023

image 我成功设置了密钥,以及接口采用了默认https://[api.openai.com/v1/chat/completions](https://api.openai.com/v1/chat/completions),为什么还是出现了上述情况,尚未成功翻译一次。谢谢大佬

似乎是因为我没绑卡,我去绑个卡看看

请问您解决了吗?我也是这样,国内的卡还不让绑

@dongliang0
Copy link

dongliang0 commented Oct 17, 2023

image
zotero6,这该怎么解决?谢谢

@DoraCya
Copy link

DoraCya commented Oct 27, 2023

image zotero6,这该怎么解决?谢谢

我也遇到了这样的问题,请问您解决了吗?

@GrayXu
Copy link
Author

GrayXu commented Oct 28, 2023

@feizhilee 自定义prompt是对应Zotero 7的pre-release的功能,见windingwind/zotero-pdf-translate@3d0ba88

@DoraCya
Copy link

DoraCya commented Oct 29, 2023

@feizhilee
Copy link

@feizhilee 自定义prompt是对应Zotero 7的pre-release的功能,见windingwind/zotero-pdf-translate@3d0ba88

收到,感谢解答

@Y177i0
Copy link

Y177i0 commented Nov 24, 2023

图像zotero6,这该怎么解决?谢谢

请问您是如何调用16k模型的?为什么我只有3.5turbo的选项嘞?

@TankTechnology
Copy link

I found that the Secret in the Dictionary Services line also needs to be set for normal translation.

@zckkkkk
Copy link

zckkkkk commented Dec 13, 2023

1702432608164

@sdlyzhq
Copy link

sdlyzhq commented Dec 14, 2023

请问下大家怎样才能修改模型?

@Charon-HN
Copy link

@GrayXu 使用自己的的代理api及密钥,显示无法使用,相同的代理api及密钥在zotero gpt插件使用正常

请问你解决这个问题了吗?

同问QAQ

确认一下代理地址,加上 v1/chat/completions

感谢,只要在第三方的接口后面添加v1/chat/completions就可以了~!!!!

@bebebetter
Copy link

image
image
您好,请问一下我目前的这个问题是GPT本身账号的问题嘛,显示....insufficient_quota之类的还是什么,请问大佬这个该怎么解决?谢谢大家!

@EthanChen8158
Copy link

@GrayXu 使用自己的的代理api及密钥,显示无法使用,相同的代理api及密钥在zotero gpt插件使用正常

请问你解决这个问题了吗?

同问QAQ

也许是后缀没有带“v1/chat/completions”?我实测第三方接口是可用的

太感谢了,困扰我多月的问题解决了

@RONG07
Copy link

RONG07 commented Mar 6, 2024

image image 您好,请问一下我目前的这个问题是GPT本身账号的问题嘛,显示....insufficient_quota之类的还是什么,请问大佬这个该怎么解决?谢谢大家!

我也是这个问题 怎么解决

@RONG07
Copy link

RONG07 commented Mar 6, 2024

Uploading image.png…

是不是没有余额了 所以密钥使用不了呢

@bebebetter
Copy link

bebebetter commented Mar 6, 2024 via email

@yuntong0411
Copy link

截屏2024-03-09 18 47 03 请问我的这个是什么问题,检查了key在别的地方可以用

@ticoAg
Copy link

ticoAg commented Mar 14, 2024

zotero7
image
实测可用

@qi984804915
Copy link

zotero7 image 实测可用
这是怎么实现的?

@YouJiacheng
Copy link

YouJiacheng commented Apr 2, 2024

很迷惑,为啥TogetherAI的Qwen1.5可以用,无问芯穹的就用不了……而且TogetherAI输错密钥会有401 Error,但无问芯穹啥反应都没有。草,无问芯穹这玩意失败了回复200然后payload里写error。

@RsFantasy
Copy link

Snipaste_2024-04-20_22-46-59大家好,我自己的GPT api,接口也用的原来的,怎么服务一直不可用啊?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment