[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1064469: marked as done (debgpt: does not handle errors)



Your message dated Wed, 16 Oct 2024 04:48:59 +0000
with message-id <E1t0vxz-00CANe-Vz@fasolo.debian.org>
and subject line Bug#1064469: fixed in debgpt 0.4.95
has caused the Debian Bug report #1064469,
regarding debgpt: does not handle errors
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1064469: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1064469
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: debgpt
Version: 0.4.94
Severity: minor

debgpt does not handle errors:

qaa:~> debgpt -Q -A "who are you?"
[19:06:24] OpenAIFrontend> Starting conversation                  frontend.py:66
[...]
LLM[2]> Traceback (most recent call last):
  File "/bin/debgpt", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3/dist-packages/debgpt/cli.py", line 455, in main
    frontend.query_once(f, msg)
  File "/usr/lib/python3/dist-packages/debgpt/frontend.py", line 218, in query_once
    reply = f(text)
            ^^^^^^^
  File "/usr/lib/python3/dist-packages/debgpt/frontend.py", line 96, in __call__
    return self.query(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/debgpt/frontend.py", line 131, in query
    completion = self.client.chat.completions.create(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/openai/_utils/_utils.py", line 275, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/openai/resources/chat/completions.py", line 663, in create
    return self._post(
           ^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/openai/_base_client.py", line 1200, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/openai/_base_client.py", line 889, in request
    return self._request(
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/openai/_base_client.py", line 980, in _request
    raise self._make_status_error_from_response(err.response) from None
openai.AuthenticationError: Error code: 401 - {'error': {'message': 'Incorrect API key provided: empty. You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}}

I would expect just a clear error message.

-- System Information:
Debian Release: trixie/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'proposed-updates-debug'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.6.15-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages debgpt depends on:
ii  python3                 3.11.6-1
ii  python3-bs4             4.12.3-1
ii  python3-openai          1.12.0-1
ii  python3-prompt-toolkit  3.0.43-1
ii  python3-requests        2.31.0+dfsg-1
ii  python3-rich            13.3.1-2
ii  python3-tomli           2.0.1-2

Versions of packages debgpt recommends:
ii  git          1:2.43.0-1
ii  man-db       2.12.0-3
ii  python3-zmq  24.0.1-5+b1
ii  tldr         0.9.2-5

Versions of packages debgpt suggests:
pn  python3-torch | python3-torch-cuda | python3-torch-rocm  <none>
pn  python3-transformers                                     <none>

-- no debconf information

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

--- End Message ---
--- Begin Message ---
Source: debgpt
Source-Version: 0.4.95
Done: Mo Zhou <lumin@debian.org>

We believe that the bug you reported is fixed in the latest version of
debgpt, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1064469@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Mo Zhou <lumin@debian.org> (supplier of updated debgpt package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Wed, 16 Oct 2024 00:25:38 -0400
Source: debgpt
Architecture: source
Version: 0.4.95
Distribution: unstable
Urgency: medium
Maintainer: Debian Deep Learning Team <debian-ai@lists.debian.org>
Changed-By: Mo Zhou <lumin@debian.org>
Closes: 1061387 1064469
Changes:
 debgpt (0.4.95) unstable; urgency=medium
 .
   * Release v0.4.95.
   * frontend: Skip console output during config template generation
   * Add llamafile frontend (alias to openai frontend)
   * Add ollama frontend (OpenAI-API compatibibility mode)
   * Add --monochrome to disable colorized outputs during conversation
     (Closes: #1061387)
   * cli: Provide a fresh-install guide (Closes: #1064469)
Checksums-Sha1:
 13b5fc67e1971ade1f8f8a41603e22a762a1fc61 1806 debgpt_0.4.95.dsc
 41f74dfaf133e0d12e4bd2d3880721251d3d53c1 25284 debgpt_0.4.95.tar.xz
 caa535f1960297ff78d0d450108fd05d03140f41 9023 debgpt_0.4.95_source.buildinfo
Checksums-Sha256:
 a4c2c54c368c8e8e5ac9104ba69eab4c0b58a242c244bcb40afd7ff4d44afd16 1806 debgpt_0.4.95.dsc
 3f15d5d2205d887320776fe472baa09bd6acc21d823f25a3d68f650ce086b70f 25284 debgpt_0.4.95.tar.xz
 0a9fc96f460308c969c0ad4bf653ad2a3b8986c021d4abe21c296e527861ff33 9023 debgpt_0.4.95_source.buildinfo
Files:
 7a325bb26ac33f8012ed8c1f7427d75b 1806 python optional debgpt_0.4.95.dsc
 82e99eb12196356d18f7dc9534fe9b53 25284 python optional debgpt_0.4.95.tar.xz
 2875494fdca094b1d3c61198e33fb27c 9023 python optional debgpt_0.4.95_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJFBAEBCgAvFiEEY4vHXsHlxYkGfjXeYmRes19oaooFAmcPQHMRHGx1bWluQGRl
Ymlhbi5vcmcACgkQYmRes19oaoqxYQ//dCHbE+JLIiK7ZiYKbyM30s6Gp/slI2UH
Cdq8mr0wJ7SWKdyi/s2od0zXJpEyvrbnMaLXtsDGUbMBVzojdXEfZ7QCzNsLa1rV
NLXwJzHiwVmp0E7hJUve+ap3aXD6TO9qgXLipuiSNqR+ZypcPG3posQ7hupYz8Sh
nFciNJsu00V1Zk0m+tU84JgB6lFEhaSFRavfkFzVIlDQ2J+6I3kIAj/pEvlwrPXs
xCOSo5w/ZxBAfC2o9RXNFdui1BW3AUwUEHqCVyyDsxMO5gyHiPTT4qehQ95YPQXS
IFAd1oYdGpnonjAFRCnpI8ZVpIg9OAxVvX9TYv4CkVB4mXe72rJanotQ/aKW8KGS
GUl+cc4OnXlcBkyWYqIO3KzjxPjldl2xnWdYG2nM3tTbB4+xb2LZM5Sl18yLLh4Z
GeYYfT2xInBLJPHk5OPrsofnCRpqlfpEkE9ZekugOz4xpWSkw3z2AXOp50rBRjzk
c7+koSs9oE8t5Skvf/kHnIls67XBHC0lOvxcgFPwjf05Mz7Uo92zrEzhjWiOoJpw
f118X/ikHAyWe5tED4yl9j+stQYZMR1iIa58/fkwLYG9TW5f0Jw3HohOasKcvIAu
bR93yBmNUgL6vOBDj2k2OAu8Sqm22TfgI7V1y3E+BTobeuEePeGlUqGF8iQ6fKGg
YOBp+cpRYRI=
=7+zY
-----END PGP SIGNATURE-----

Attachment: pgpZB5jS4dHZW.pgp
Description: PGP signature


--- End Message ---

Reply to: