Comments (9)
def main():
client = OpenAI(
api_key=gpt.api_key(),
base_url=gpt.api_base() # 带v1
)
response = client.post(path='/chat/completions', cast_to=dict, body=data)
print(f'response: {util.json_dump(response)}')
请求的路径是错的,如上修改
from gpt_api_free.
我也有相同问题。
from gpt_api_free.
俺也一样
from gpt_api_free.
俺也一样
from gpt_api_free.
我也一样,甚至我的免费key有好几个月没用过
from gpt_api_free.
俺也一样
from gpt_api_free.
我也
from gpt_api_free.
该问题由系统更新后的bug引起,已紧急修复。
from gpt_api_free.
这个复现了?代码:
import gpt
import requests
from openai import OpenAI
import util
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {gpt.api_key()}'
}
data = {
'model': 'gpt-3.5-turbo',
'messages': [
{'role': 'user', 'content': '什么是图计算?'}
],
'temperature': 0.7
}
def main():
client = OpenAI(
api_key=gpt.api_key(),
base_url=gpt.api_base() # 带v1
)
response = client.post(path='/completions', cast_to=dict, body=data)
print(f'response: {util.json_dump(response)}')
if __name__ == '__main__':
main()
model用的3.5turbo,有报错:
openai.PermissionDeniedError: Error code: 403 - {'error': {'message': '免费API限制使用gpt-3.5-turbo,gpt-4 和 embeddings模型,如有更多需求,请访问 https://buyca.top 购买付费API。The free account is limited to use gpt-3.5-turbo, gpt-4 and embeddings. If you have additional requirements, please visit https://buyca.top to purchase a premium key.', 'type': 'chatanywhere_error', 'param': None, 'code': '403 FORBIDDEN'}}
刚在README用github账号申请的免费key。现在不支持还是?免费key现在能用哪些model?
from gpt_api_free.
Related Issues (20)
- 2024.4.29 不支持流式响应了? HOT 1
- OpenAI response: content=None HOT 13
- Webpilot为什么说Invalid Key HOT 1
- zotero里面GPT用不了 HOT 2
- 不可以使用Langchain连接 HOT 1
- insufficient_quota
- 本地调试是返回中文内容,放到另一个主机上就返回英文内容了
- zotero-gpt中使用出错 提示“Incorrect API key provided" HOT 1
- token计算问题.app,查询后台,计算示例网页各自的结果都不同. HOT 3
- 支持Obsidian吗? HOT 1
- [Enhancement] 什么时候计划集成gpt-4o呢? HOT 2
- [Enhancement]请问能否支持dbever HOT 4
- demo.py报错chunk.choices[0].delta.content list index out of range HOT 1
- 免费的api key不支持官方的API HOT 1
- 现在的价格还有折扣吗? HOT 1
- 使用langchain写这个免费的gpt的接口 好像一直连不上 HOT 2
- API key调用失败 HOT 2
- VIP通道响应速度会不会比普通KEY快? HOT 5
- zotero gpt的askpdf功能失效,但是换用了openai的官方api后是可以用的,所以排除了zotero gpt插件的问题 HOT 6
- 作者您好,zotero使用gpt无法翻译 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpt_api_free.