Skip to content

Since update, Issu with function calling #748

@rcspam

Description

@rcspam
$ sgpt  --help
Traceback (most recent call last):
  File "/home/user/.local/bin/sgpt", line 3, in <module>
    from sgpt import cli
  File "......./venvs/shell-gpt/lib/python3.12/site-packages/sgpt/__init__.py", line 1, in <module>
    from .app import main as main
  File "....../venvs/shell-gpt/lib/python3.12/site-packages/sgpt/app.py", line 13, in <module>
    from sgpt.function import get_openai_schemas
  File "....../venvs/shell-gpt/lib/python3.12/site-packages/sgpt/function.py", line 56, in <module>
    functions = [Function(str(path)) for path in functions_folder.glob("*.py")]
                 ^^^^^^^^^^^^^^^^^^^
  File "...../venvs/shell-gpt/lib/python3.12/site-packages/sgpt/function.py", line 15, in __init__
    self._openai_schema = module.Function.openai_schema()
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'dict' object is not callable

If i remove the functions from the function directory, there is no more probleme

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions