Comments (9)
参数传对了吗?我使用是正常的
from one-api.
第三方API为:https://api.aigcapi.io
联系第三方在线客服,反馈该api经测试可以生成图片。实测用Chatbox会发生如下报错:
遇到了来自 OpenAI API 的错误,一般是由错误设置或账户问题引起的。请检查 AI 设置和账户情况,或者[点击这里查看常见问题文档](https://chatboxai.app/redirect_app/faqs/zh-Hans)。
API Error: Status Code 400, {"error":{"message":"relay error (request id: 20231128031447596282495QuQFC4Ki)","type":"one_api_error","param":"","code":"n_not_within_range"}}
from one-api.
参数传对了吗?我使用是正常的
请问能提供一个正确的调用示例吗?
from one-api.
参数传对了吗?我使用是正常的
请问能提供一个正确的调用示例吗?
就是用的官方库:
response = openai.Image.create(prompt=query, model='dall-e-3', size='1024x1024',style='vivid', quality='standard', n=1)
image_url = response["data"][0]["url"]
from one-api.
参数传对了吗?我使用是正常的
请问能提供一个正确的调用示例吗?
就是用的官方库:
response = openai.Image.create(prompt=query, model='dall-e-3', size='1024x1024',style='vivid', quality='standard', n=1) image_url = response["data"][0]["url"]
from openai import OpenAI
# Set your OpenAI API key and custom domain endpoint
api_key = '<api_key>'
api_base = '<host>/v1/' # Replace with your custom domain URL
prompt = 'gundam in a ruined cityscape'
client = OpenAI(api_key=api_key, base_url=api_base)
response = client.images.generate(prompt=prompt, model='dall-e-3', size='1024x1024',style='vivid', quality='standard', n=1)
# image_url = response["data"][0]["url"]
print(response)
openai.NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}
不太对。 openai==1.3.5
from one-api.
参数传对了吗?我使用是正常的
请问能提供一个正确的调用示例吗?
就是用的官方库:
response = openai.Image.create(prompt=query, model='dall-e-3', size='1024x1024',style='vivid', quality='standard', n=1) image_url = response["data"][0]["url"]
from openai import OpenAI # Set your OpenAI API key and custom domain endpoint api_key = '<api_key>' api_base = '<host>/v1/' # Replace with your custom domain URL prompt = 'gundam in a ruined cityscape' client = OpenAI(api_key=api_key, base_url=api_base) response = client.images.generate(prompt=prompt, model='dall-e-3', size='1024x1024',style='vivid', quality='standard', n=1) # image_url = response["data"][0]["url"] print(response)openai.NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}
不太对。 openai==1.3.5
from one-api.
参数传对了吗?我使用是正常的
请问能提供一个正确的调用示例吗?
就是用的官方库:
response = openai.Image.create(prompt=query, model='dall-e-3', size='1024x1024',style='vivid', quality='standard', n=1) image_url = response["data"][0]["url"]
from openai import OpenAI # Set your OpenAI API key and custom domain endpoint api_key = '<api_key>' api_base = '<host>/v1/' # Replace with your custom domain URL prompt = 'gundam in a ruined cityscape' client = OpenAI(api_key=api_key, base_url=api_base) response = client.images.generate(prompt=prompt, model='dall-e-3', size='1024x1024',style='vivid', quality='standard', n=1) # image_url = response["data"][0]["url"] print(response)openai.NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}
不太对。 openai==1.3.5
one-api/controller/relay-image.go
Line 103 in 0e73418
找到问题了,此处没有对 Azure 的渠道做兼容,或者兼容得不对。
from one-api.
参数传对了吗?我使用是正常的
请问能提供一个正确的调用示例吗?
就是用的官方库:
response = openai.Image.create(prompt=query, model='dall-e-3', size='1024x1024',style='vivid', quality='standard', n=1) image_url = response["data"][0]["url"]
from openai import OpenAI # Set your OpenAI API key and custom domain endpoint api_key = '<api_key>' api_base = '<host>/v1/' # Replace with your custom domain URL prompt = 'gundam in a ruined cityscape' client = OpenAI(api_key=api_key, base_url=api_base) response = client.images.generate(prompt=prompt, model='dall-e-3', size='1024x1024',style='vivid', quality='standard', n=1) # image_url = response["data"][0]["url"] print(response)openai.NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}
不太对。 openai==1.3.5
https://github.com/songquanpeng/one-api/blob/main/controller/relay-utils.go#L191
这一行代码很可疑,好像直接跳过了,没有进去找 Azure 的路由。
因为调用 DALL-E-3 的时候 传入了requestURL
从而忽略了openai/deployments
from one-api.
我似乎修完了,等下搞个PR
from one-api.
Related Issues (20)
- 增加对 gemini-pro-vision 模型的支持
- 使用 Azure OpenAI 时,OpenAI API 调用正常。但 不支持REST API的格式么? HOT 5
- 在管理员的日志处,显示请求错误的报告
- listModel返回的模型与实际不符
- 缺失健康检查接口 HOT 1
- 多机部署数据不同步,salve改master配置,不配置redis的情况下
- 本地部署whisper添加进one-api无法正常工作
- 代码优化建议:封装一下接口响应
- 为什么启动整个画面都是白色的? HOT 2
- gemini-pro返回400错误 HOT 20
- 使用docker部署之后,调用API到Dify 的有报错(The server is overloaded or not ready yet.)
- Gemini Pro请求问题
- 我已经通过HTTP_PROXY的环境变量设置带理,可以访问openai等外网,但是否可以设置某些国内服务不用代理 HOT 2
- 关于国产大模型的流式调用的问题。 HOT 1
- 通义千问新模型Qwen-vl-plus
- 项目本地启动白屏 HOT 2
- docker构建镜像报错
- 希望增加对gemini安全审查的参数传入 HOT 1
- 增加对gemini-pro向量模型models/embedding-001的支持
- 请求增加重试次数的更多自定义设置
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 one-api.