Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用画图模型无法出图 #12

Open
Hwongyohong opened this issue Jun 3, 2024 · 0 comments
Open

使用画图模型无法出图 #12

Hwongyohong opened this issue Jun 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Hwongyohong
Copy link

模型:Dall-E-3
我测试了下,key是可以生成图片的。
[2024-06-03 11:15:24 +0800] [687] [ERROR] Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/httptools_impl.py", line 399, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py", line 70, in call
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/applications.py", line 123, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 186, in call
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 164, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 189, in call
with collapse_excgroups():
File "/usr/lib/python3.10/contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.10/dist-packages/starlette/_utils.py", line 93, in collapse_excgroups
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 261, in wrap
await func()
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 217, in stream_response
return await super().stream_response(send)
File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 250, in stream_response
async for chunk in self.body_iterator:
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 181, in body_stream
raise app_exc
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 151, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/cors.py", line 93, in call
await self.simple_response(scope, receive, send, request_headers=headers)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/cors.py", line 148, in simple_response
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 189, in call
with collapse_excgroups():
File "/usr/lib/python3.10/contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.10/dist-packages/starlette/_utils.py", line 93, in collapse_excgroups
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 261, in wrap
await func()
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 217, in stream_response
return await super().stream_response(send)
File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 250, in stream_response
async for chunk in self.body_iterator:
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 181, in body_stream
raise app_exc
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 151, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 65, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 756, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 776, in app
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 485, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/applications.py", line 123, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 186, in call
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 164, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 189, in call
with collapse_excgroups():
File "/usr/lib/python3.10/contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.10/dist-packages/starlette/_utils.py", line 93, in collapse_excgroups
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 261, in wrap
await func()
File "/usr/local/lib/python3.10/dist-packages/starlette/responses.py", line 250, in stream_response
async for chunk in self.body_iterator:
File "/opt/chatPilot/chatpilot/apps/openai_app.py", line 437, in event_generator
async for event in events:
File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 4725, in astream_events
async for item in self.bound.astream_events(
File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 1136, in astream_events
async for log in _astream_log_implementation( # type: ignore[misc]
File "/usr/local/lib/python3.10/dist-packages/langchain_core/tracers/log_stream.py", line 616, in _astream_log_implementation
await task
File "/usr/local/lib/python3.10/dist-packages/langchain_core/tracers/log_stream.py", line 570, in consume_astream
async for chunk in runnable.astream(input, config, **kwargs):
File "/usr/local/lib/python3.10/dist-packages/langchain/agents/agent.py", line 1592, in astream
async for step in iterator:
File "/usr/local/lib/python3.10/dist-packages/langchain/agents/agent_iterator.py", line 240, in aiter
async for chunk in self.agent_executor._aiter_next_step(
File "/usr/local/lib/python3.10/dist-packages/langchain/agents/agent.py", line 1303, in _aiter_next_step
output = await self.agent.aplan(
File "/usr/local/lib/python3.10/dist-packages/langchain/agents/agent.py", line 553, in aplan
async for chunk in self.runnable.astream(
File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 2900, in astream
async for chunk in self.atransform(input_aiter(), config, **kwargs):
File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 2883, in atransform
async for chunk in self._atransform_stream_with_config(
File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 1985, in _atransform_stream_with_config
chunk = cast(Output, await py_anext(iterator))
File "/usr/local/lib/python3.10/dist-packages/langchain_core/tracers/log_stream.py", line 237, in tap_output_aiter
async for chunk in output:
File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 2853, in _atransform
async for output in final_pipeline:
File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 1316, in atransform
async for ichunk in input:
File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 4748, in atransform
async for item in self.bound.atransform(
File "/usr/local/lib/python3.10/dist-packages/langchain_core/runnables/base.py", line 1334, in atransform
async for output in self.astream(final, config, **kwargs):
File "/usr/local/lib/python3.10/dist-packages/langchain_core/language_models/chat_models.py", line 319, in astream
raise e
File "/usr/local/lib/python3.10/dist-packages/langchain_core/language_models/chat_models.py", line 297, in astream
async for chunk in self._astream(
File "/usr/local/lib/python3.10/dist-packages/langchain_openai/chat_models/base.py", line 511, in _astream
async for chunk in await self.async_client.create(
File "/usr/local/lib/python3.10/dist-packages/openai/resources/chat/completions.py", line 1334, in create
return await self._post(
File "/usr/local/lib/python3.10/dist-packages/openai/_base_client.py", line 1738, in post
return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
File "/usr/local/lib/python3.10/dist-packages/openai/_base_client.py", line 1441, in request
return await self._request(
File "/usr/local/lib/python3.10/dist-packages/openai/_base_client.py", line 1532, in _request
raise self._make_status_error_from_response(err.response) from None
openai.PermissionDeniedError: Error code: 403 - {'error': {'message': 'You are not allowed to sample from this model', 'type': 'invalid_request_error', 'param': None, 'code': None}}

@Hwongyohong Hwongyohong added the bug Something isn't working label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant