Giter Site home page Giter Site logo

Comments (2)

TheR1D avatar TheR1D commented on May 23, 2024 1

Hi @eiger8, in one of our latest releases, there were significant changes to the roles logic. Old roles are not compatible with version 1.0.0 and above. You can read about the version 1.0.0 changes here. Given that I'm closing this issue, but feel free to reopen it.

Because of significant changes in roles, unfortunately previously created custom roles and chats will not work with ShellGPT v1.0.0 and you will need to re-create them using new version.

from shell_gpt.

eiger8 avatar eiger8 commented on May 23, 2024

sgpt --role bash_script_generator "generate basic shell script" 2> err-role.txt stack trace

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /usr/local/lib/python3.11/site-packages/sgpt/app.py:199 in main                                  │
│                                                                                                  │
│   196 │   role_class = (                                                                         │
│   197 │   │   DefaultRoles.check_get(shell, describe_shell, code)                                │
│   198 │   │   if not role                                                                        │
│ ❱ 199 │   │   else SystemRole.get(role)                                                          │
│   200 │   )                                                                                      │
│   201 │                                                                                          │
│   202 │   function_schemas = (get_openai_schemas() or None) if functions else None               │
│                                                                                                  │
│ ╭────────────────────── locals ───────────────────────╮                                          │
│ │               cache = True                          │                                          │
│ │                chat = None                          │                                          │
│ │                code = False                         │                                          │
│ │         create_role = None                          │                                          │
│ │      describe_shell = False                         │                                          │
│ │              editor = False                         │                                          │
│ │           functions = True                          │                                          │
│ │   install_functions = None                          │                                          │
│ │ install_integration = None                          │                                          │
│ │         interaction = True                          │                                          │
│ │          list_chats = None                          │                                          │
│ │          list_roles = None                          │                                          │
│ │               model = 'gpt-4'                       │                                          │
│ │              prompt = 'generate basic shell script' │                                          │
│ │                repl = None                          │                                          │
│ │                role = 'bash_script_generator'       │                                          │
│ │               shell = False                         │                                          │
│ │           show_chat = None                          │                                          │
│ │           show_role = None                          │                                          │
│ │        stdin_passed = False                         │                                          │
│ │         temperature = 0.0                           │                                          │
│ │               top_p = 1.0                           │                                          │
│ │             version = None                          │                                          │
│ ╰─────────────────────────────────────────────────────╯                                          │
│                                                                                                  │
│ /usr/local/lib/python3.11/site-packages/sgpt/role.py:79 in get                                   │
│                                                                                                  │
│    76 │   │   file_path = cls.storage / f"{name}.json"                                           │
│    77 │   │   if not file_path.exists():                                                         │
│    78 │   │   │   raise BadArgumentUsage(f'Role "{name}" not found.')                            │
│ ❱  79 │   │   return cls(**json.loads(file_path.read_text()))                                    │
│    80 │                                                                                          │
│    81 │   @classmethod                                                                           │
│    82 │   @option_callback                                                                       │
│                                                                                                  │
│ ╭───────────────────────────────────────── locals ─────────────────────────────────────────╮     │
│ │       cls = <class 'sgpt.role.SystemRole'>                                               │     │
│ │ file_path = PosixPath('/Users/oorys/.config/shell_gpt/roles/bash_script_generator.json') │     │
│ │      name = 'bash_script_generator'                                                      │     │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────╯     │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: SystemRole.__init__() got an unexpected keyword argument 'expecting'

from shell_gpt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.