"http://www.w3.org/TR/html4/loose.dtd">
type="text/css">
href="?__debugger__=yes&cmd=resource&f=console.png">
AttributeError
AttributeError: 'str' object has no attribute 'choices'
Traceback (most recent call last)
File "C:\Users\laioc\anaconda3\Lib\site-packages\flask\app.py",
line 2464,
in __call__
return self.wsgi_app(environ, start_response)
File "C:\Users\laioc\anaconda3\Lib\site-packages\flask\app.py",
line 2450,
in wsgi_app
response = self.handle_exception(e)
File "C:\Users\laioc\anaconda3\Lib\site-packages\flask\app.py",
line 1867,
in handle_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\laioc\anaconda3\Lib\site-packages\flask\_compat.py",
line 39,
in reraise
raise value
File "C:\Users\laioc\anaconda3\Lib\site-packages\flask\app.py",
line 2447,
in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\laioc\anaconda3\Lib\site-packages\flask\app.py",
line 1952,
in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\laioc\anaconda3\Lib\site-packages\flask\app.py",
line 1821,
in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\laioc\anaconda3\Lib\site-packages\flask\_compat.py",
line 39,
in reraise
raise value
File "C:\Users\laioc\anaconda3\Lib\site-packages\flask\app.py",
line 1950,
in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\laioc\anaconda3\Lib\site-packages\flask\app.py",
line 1936,
in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "C:\chatbot\app.py",
line 55,
in chat
texto_resposta = resposta.choices[0].message.content
AttributeError: 'str' object has no attribute 'choices'
This is the Copy/Paste friendly version of the traceback.
Traceback (most recent call last):<br> File "C:\Users\laioc\anaconda3\Lib\site-packages\flask\app.py", line 2464, in __call__<br> return self.wsgi_app(environ, start_response)<br> File "C:\Users\laioc\anaconda3\Lib\site-packages\flask\app.py", line 2450, in wsgi_app<br> response = self.handle_exception(e)<br> File "C:\Users\laioc\anaconda3\Lib\site-packages\flask\app.py", line 1867, in handle_exception<br> reraise(exc_type, exc_value, tb)<br> File "C:\Users\laioc\anaconda3\Lib\site-packages\flask\_compat.py", line 39, in reraise<br> raise value<br> File "C:\Users\laioc\anaconda3\Lib\site-packages\flask\app.py", line 2447, in wsgi_app<br> response = self.full_dispatch_request()<br> File "C:\Users\laioc\anaconda3\Lib\site-packages\flask\app.py", line 1952, in full_dispatch_request<br> rv = self.handle_user_exception(e)<br> File "C:\Users\laioc\anaconda3\Lib\site-packages\flask\app.py", line 1821, in handle_user_exception<br> reraise(exc_type, exc_value, tb)<br> File "C:\Users\laioc\anaconda3\Lib\site-packages\flask\_compat.py", line 39, in reraise<br> raise value<br> File "C:\Users\laioc\anaconda3\Lib\site-packages\flask\app.py", line 1950, in full_dispatch_request<br> rv = self.dispatch_request()<br> File "C:\Users\laioc\anaconda3\Lib\site-packages\flask\app.py", line 1936, in dispatch_request<br> return self.view_functions[rule.endpoint](**req.view_args)<br> File "C:\chatbot\app.py", line 55, in chat<br> texto_resposta = resposta.choices[0].message.content<br>AttributeError: 'str' object has no attribute 'choices'
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.
Brought to you by DON'T PANIC, your
friendly Werkzeug powered traceback interpreter.
-----------------------------------------------------------