账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    • 纯天然无毒无添加防腐剂2020-01-01 00:00
    35
    0

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 暗云飞飞 普通会员 1楼
      dashscope.common.error.InputRequired: prompt or messages is required! // Werkzeug Debugger

      InputRequired

      dashscope.common.error.InputRequired: prompt or messages is required!

      Traceback (most recent call last)

      • File "/www/server/pyporject_evn/0001_venv/lib/python3.10/site-packages/flask/app.py", line 1488, in __call__

            ) -> cabc.Iterable[bytes]:
                """The WSGI server calls the Flask application object as the
                WSGI application. This calls :meth:`wsgi_app`, which can be
                wrapped to apply middleware.
                """
                return self.wsgi_app(environ, start_response)
      • File "/www/server/pyporject_evn/0001_venv/lib/python3.10/site-packages/flask/app.py", line 1466, in wsgi_app

                    try:
                        ctx.push()
                        response = self.full_dispatch_request()
                    except Exception as e:
                        error = e
                        response = self.handle_exception(e)
                    except:  # noqa: B001
                        error = sys.exc_info()[1]
                        raise
                    return response(environ, start_response)
                finally:
      • File "/www/server/pyporject_evn/0001_venv/lib/python3.10/site-packages/flask/app.py", line 1463, in wsgi_app

                ctx = self.request_context(environ)
                error: BaseException | None = None
                try:
                    try:
                        ctx.push()
                        response = self.full_dispatch_request()
                    except Exception as e:
                        error = e
                        response = self.handle_exception(e)
                    except:  # noqa: B001
                        error = sys.exc_info()[1]
      • File "/www/server/pyporject_evn/0001_venv/lib/python3.10/site-packages/flask/app.py", line 872, in full_dispatch_request

                    request_started.send(self, _async_wrapper=self.ensure_sync)
                    rv = self.preprocess_request()
                    if rv is None:
                        rv = self.dispatch_request()
                except Exception as e:
                    rv = self.handle_user_exception(e)
                return self.finalize_request(rv)
         
            def finalize_request(
                self,
                rv: ft.ResponseReturnValue | HTTPException,
      • File "/www/server/pyporject_evn/0001_venv/lib/python3.10/site-packages/flask/app.py", line 870, in full_dispatch_request

         
                try:
                    request_started.send(self, _async_wrapper=self.ensure_sync)
                    rv = self.preprocess_request()
                    if rv is None:
                        rv = self.dispatch_request()
                except Exception as e:
                    rv = self.handle_user_exception(e)
                return self.finalize_request(rv)
         
            def finalize_request(
      • File "/www/server/pyporject_evn/0001_venv/lib/python3.10/site-packages/flask/app.py", line 855, in dispatch_request

                    and req.method == "OPTIONS"
                ):
                    return self.make_default_options_response()
                # otherwise dispatch to the handler for that endpoint
                view_args: dict[str, t.Any] = req.view_args  # type: ignore[assignment]
                return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
         
            def full_dispatch_request(self) -> Response:
                """Dispatches the request and on top of that performs request
                pre and postprocessing as well as HTTP exception catching and
                error handling.
      • File "/www/python/0001/hello.py", line 19, in generate

         
            # 获取 GET 请求中的提示
            prompt = request.args.get('prompt', default='', type=str)
         
            # 调用生成函数
            response = dashscope.Generation.call(
                model='qwen-1.8b-chat',
                prompt=prompt,
                seed=1234,
                top_p=0.8,
                result_format='message',
      • File "/www/server/pyporject_evn/0001_venv/lib/python3.10/site-packages/dashscope/aigc/generation.py", line 123, in call

                          Generator[GenerationResponse, None, None]]: If
                    stream is True, return Generator, otherwise GenerationResponse.
                """
                if (prompt is None or not prompt) and (messages is None
                                                       or not messages):
                    raise InputRequired('prompt or messages is required!')
                if model is None or not model:
                    raise ModelRequired('Model is required!')
                task_group, function = _get_task_group_and_task(__name__)
                if plugins is not None:
                    headers = kwargs.pop('headers', {})
      dashscope.common.error.InputRequired: prompt or messages is required!

      This is the Copy/Paste friendly version of the traceback.

      The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error. If you enable JavaScript you can also use additional features such as code execution (if the evalex feature is enabled), automatic pasting of the exceptions and much more.

      Console Locked

      The console is locked and needs to be unlocked by entering the PIN. You can find the PIN printed out on the standard output of your shell that runs the server.

      PIN:

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部