You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi shell_gpt community! I am using shell_gpt with python3.13 recently, and encountered a bug when functions are installed.
Traceback (most recent call last):
File "/home/xx/Downloads/sgpt_install/venv/bin/sgpt", line 5, in<module>
from sgpt import cli
File "/home/xx/Downloads/sgpt_install/venv/lib/python3.13/site-packages/sgpt/__init__.py", line 1, in<module>
from .app import main as main
File "/home/xx/Downloads/sgpt_install/venv/lib/python3.13/site-packages/sgpt/app.py", line 12, in<module>
from sgpt.function import get_openai_schemas
File "/home/xx/Downloads/sgpt_install/venv/lib/python3.13/site-packages/sgpt/function.py", line 53, in<module>
functions = [Function(str(path)) forpathin functions_folder.glob("*.py")]
~~~~~~~~^^^^^^^^^^^
File "/home/xx/Downloads/sgpt_install/venv/lib/python3.13/site-packages/sgpt/function.py", line 17, in __init__
self._name = self._openai_schema["name"]
~~~~~~~~~~~~~~~~~~~^^^^^^^^
TypeError: 'method' object is not subscriptable
This is caused by the removal of "classmethod properties" feature in python3.13.(https://docs.python.org/3.13/library/functions.html#classmethod). Unfortuanetly, this feature is used by the instructor package, and shell_gpt relies on this package in the implementation of function calling. To solve this problem, the instructor community has implemented a classproperty decorator. So upgrade the instructor version can solve the bug. I have noticed that shell_gpt is still using instructor < 1.0.0, maybe we can try to upgrade it?
The text was updated successfully, but these errors were encountered:
Hi
shell_gpt
community! I am usingshell_gpt
with python3.13 recently, and encountered a bug when functions are installed.This is caused by the removal of "classmethod properties" feature in python3.13.(https://docs.python.org/3.13/library/functions.html#classmethod). Unfortuanetly, this feature is used by the
instructor
package, andshell_gpt
relies on this package in the implementation of function calling. To solve this problem, theinstructor
community has implemented aclassproperty
decorator. So upgrade theinstructor
version can solve the bug. I have noticed thatshell_gpt
is still usinginstructor < 1.0.0
, maybe we can try to upgrade it?The text was updated successfully, but these errors were encountered: