shell_gpt icon indicating copy to clipboard operation
shell_gpt copied to clipboard

Will Not Run On First Install

Open richardstevenhack opened this issue 1 year ago โ€ข 2 comments

I had previously installed Shell-GPT with the LiteLLM spec, but had problems, so I uninstalled it.

Trying again to get it to work, I did a fresh install using pipx as my openSUSE Tumbleweed system is a managed environment again using the LiteLLM spec as I intend to run with using Ollama local models.

On first run, as shown in the following shell output, I get the following. There was no attempt to prompt for an openAI key at all this time, but it reported an invalid openAI key.

rhack@localhost:/Data2/Work> pipx install shell-gpt[litellm] installed package shell-gpt 1.4.3, installed using Python 3.11.9 These apps are now globally available - sgpt done! โœจ ๐ŸŒŸ โœจ

rhack@localhost:/Data2/Work> sgpt

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Traceback (most recent call last) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ /home/rhack/.local/share/pipx/venvs/shell-gpt/lib64/python3.11/site-packages/sgpt/app.py:229 in โ”‚ โ”‚ main โ”‚ โ”‚ โ”‚ โ”‚ 226 โ”‚ โ”‚ โ”‚ functions=function_schemas, โ”‚ โ”‚ 227 โ”‚ โ”‚ ) โ”‚ โ”‚ 228 โ”‚ else: โ”‚ โ”‚ โฑ 229 โ”‚ โ”‚ full_completion = DefaultHandler(role_class, md).handle( โ”‚ โ”‚ 230 โ”‚ โ”‚ โ”‚ prompt=prompt, โ”‚ โ”‚ 231 โ”‚ โ”‚ โ”‚ model=model, โ”‚ โ”‚ 232 โ”‚ โ”‚ โ”‚ temperature=temperature, โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ cache = True โ”‚ โ”‚ โ”‚ โ”‚ chat = None โ”‚ โ”‚ โ”‚ โ”‚ code = False โ”‚ โ”‚ โ”‚ โ”‚ create_role = None โ”‚ โ”‚ โ”‚ โ”‚ describe_shell = False โ”‚ โ”‚ โ”‚ โ”‚ editor = False โ”‚ โ”‚ โ”‚ โ”‚ function_schemas = None โ”‚ โ”‚ โ”‚ โ”‚ functions = True โ”‚ โ”‚ โ”‚ โ”‚ install_functions = None โ”‚ โ”‚ โ”‚ โ”‚ install_integration = None โ”‚ โ”‚ โ”‚ โ”‚ interaction = True โ”‚ โ”‚ โ”‚ โ”‚ list_chats = None โ”‚ โ”‚ โ”‚ โ”‚ list_roles = None โ”‚ โ”‚ โ”‚ โ”‚ md = True โ”‚ โ”‚ โ”‚ โ”‚ model = 'gpt-4-1106-preview' โ”‚ โ”‚ โ”‚ โ”‚ prompt = '' โ”‚ โ”‚ โ”‚ โ”‚ repl = None โ”‚ โ”‚ โ”‚ โ”‚ role = None โ”‚ โ”‚ โ”‚ โ”‚ role_class = <sgpt.role.SystemRole object at 0x7f968b907c50> โ”‚ โ”‚ โ”‚ โ”‚ shell = False โ”‚ โ”‚ โ”‚ โ”‚ show_chat = None โ”‚ โ”‚ โ”‚ โ”‚ show_role = None โ”‚ โ”‚ โ”‚ โ”‚ stdin_passed = False โ”‚ โ”‚ โ”‚ โ”‚ temperature = 0.0 โ”‚ โ”‚ โ”‚ โ”‚ top_p = 1.0 โ”‚ โ”‚ โ”‚ โ”‚ version = None โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ”‚ โ”‚ โ”‚ /home/rhack/.local/share/pipx/venvs/shell-gpt/lib64/python3.11/site-packages/sgpt/handlers/handl โ”‚ โ”‚ er.py:158 in handle โ”‚ โ”‚ โ”‚ โ”‚ 155 โ”‚ โ”‚ โ”‚ caching=caching, โ”‚ โ”‚ 156 โ”‚ โ”‚ โ”‚ **kwargs, โ”‚ โ”‚ 157 โ”‚ โ”‚ ) โ”‚ โ”‚ โฑ 158 โ”‚ โ”‚ return self.printer(generator, not disable_stream) โ”‚ โ”‚ 159 โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ caching = True โ”‚ โ”‚ โ”‚ โ”‚ disable_stream = False โ”‚ โ”‚ โ”‚ โ”‚ functions = None โ”‚ โ”‚ โ”‚ โ”‚ generator = <generator object Cache.call..wrapper at 0x7f968b918040> โ”‚ โ”‚ โ”‚ โ”‚ kwargs = {} โ”‚ โ”‚ โ”‚ โ”‚ messages = [ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ { โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'role': 'system', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'content': 'You are ShellGPT\nYou are programming and system โ”‚ โ”‚ โ”‚ โ”‚ administration assistant.\nYou ar'+284 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ }, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ {'role': 'user', 'content': ''} โ”‚ โ”‚ โ”‚ โ”‚ ] โ”‚ โ”‚ โ”‚ โ”‚ model = 'gpt-4-1106-preview' โ”‚ โ”‚ โ”‚ โ”‚ prompt = '' โ”‚ โ”‚ โ”‚ โ”‚ self = <sgpt.handlers.default_handler.DefaultHandler object at 0x7f968b907550> โ”‚ โ”‚ โ”‚ โ”‚ temperature = 0.0 โ”‚ โ”‚ โ”‚ โ”‚ top_p = 1.0 โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ”‚ โ”‚ โ”‚ /home/rhack/.local/share/pipx/venvs/shell-gpt/lib64/python3.11/site-packages/sgpt/printer.py:23 โ”‚ โ”‚ in call โ”‚ โ”‚ โ”‚ โ”‚ 20 โ”‚ โ”‚ โ”‚ 21 โ”‚ def call(self, chunks: Generator[str, None, None], live: bool = True) -> str: โ”‚ โ”‚ 22 โ”‚ โ”‚ if live: โ”‚ โ”‚ โฑ 23 โ”‚ โ”‚ โ”‚ return self.live_print(chunks) โ”‚ โ”‚ 24 โ”‚ โ”‚ with self.console.status("[bold green]Loading..."): โ”‚ โ”‚ 25 โ”‚ โ”‚ โ”‚ full_completion = "".join(chunks) โ”‚ โ”‚ 26 โ”‚ โ”‚ self.static_print(full_completion) โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ chunks = <generator object Cache.call..wrapper at 0x7f968b918040> โ”‚ โ”‚ โ”‚ โ”‚ live = True โ”‚ โ”‚ โ”‚ โ”‚ self = <sgpt.printer.MarkdownPrinter object at 0x7f968b907050> โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ”‚ โ”‚ โ”‚ /home/rhack/.local/share/pipx/venvs/shell-gpt/lib64/python3.11/site-packages/sgpt/printer.py:38 โ”‚ โ”‚ in live_print โ”‚ โ”‚ โ”‚ โ”‚ 35 โ”‚ def live_print(self, chunks: Generator[str, None, None]) -> str: โ”‚ โ”‚ 36 โ”‚ โ”‚ full_completion = "" โ”‚ โ”‚ 37 โ”‚ โ”‚ with Live(console=self.console) as live: โ”‚ โ”‚ โฑ 38 โ”‚ โ”‚ โ”‚ for chunk in chunks: โ”‚ โ”‚ 39 โ”‚ โ”‚ โ”‚ โ”‚ full_completion += chunk โ”‚ โ”‚ 40 โ”‚ โ”‚ โ”‚ โ”‚ markdown = Markdown(markup=full_completion, code_theme=self.theme) โ”‚ โ”‚ 41 โ”‚ โ”‚ โ”‚ โ”‚ live.update(markdown, refresh=True) โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ chunks = <generator object Cache.call..wrapper at 0x7f968b918040> โ”‚ โ”‚ โ”‚ โ”‚ full_completion = '' โ”‚ โ”‚ โ”‚ โ”‚ live = <rich.live.Live object at 0x7f968b907910> โ”‚ โ”‚ โ”‚ โ”‚ self = <sgpt.printer.MarkdownPrinter object at 0x7f968b907050> โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ”‚ โ”‚ โ”‚ /home/rhack/.local/share/pipx/venvs/shell-gpt/lib64/python3.11/site-packages/sgpt/cache.py:37 in โ”‚ โ”‚ wrapper โ”‚ โ”‚ โ”‚ โ”‚ 34 โ”‚ โ”‚ โ”‚ โ”‚ yield file.read_text() โ”‚ โ”‚ 35 โ”‚ โ”‚ โ”‚ โ”‚ return โ”‚ โ”‚ 36 โ”‚ โ”‚ โ”‚ result = "" โ”‚ โ”‚ โฑ 37 โ”‚ โ”‚ โ”‚ for i in func(*args, **kwargs): โ”‚ โ”‚ 38 โ”‚ โ”‚ โ”‚ โ”‚ result += i โ”‚ โ”‚ 39 โ”‚ โ”‚ โ”‚ โ”‚ yield i โ”‚ โ”‚ 40 โ”‚ โ”‚ โ”‚ if "@FunctionCall" not in result: โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ args = (<sgpt.handlers.default_handler.DefaultHandler object at 0x7f968b907550>,) โ”‚ โ”‚ โ”‚ โ”‚ file = PosixPath('/tmp/cache/0bc79c3466cb8a6e186e91e81dae3f86') โ”‚ โ”‚ โ”‚ โ”‚ func = <function Handler.get_completion at 0x7f968b900e00> โ”‚ โ”‚ โ”‚ โ”‚ key = '0bc79c3466cb8a6e186e91e81dae3f86' โ”‚ โ”‚ โ”‚ โ”‚ kwargs = { โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'model': 'gpt-4-1106-preview', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'temperature': 0.0, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'top_p': 1.0, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'messages': [ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ { โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'role': 'system', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'content': 'You are ShellGPT\nYou are programming and system โ”‚ โ”‚ โ”‚ โ”‚ administration assistant.\nYou ar'+284 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ }, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ {'role': 'user', 'content': ''} โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ ], โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'functions': None โ”‚ โ”‚ โ”‚ โ”‚ } โ”‚ โ”‚ โ”‚ โ”‚ result = '' โ”‚ โ”‚ โ”‚ โ”‚ self = <sgpt.cache.Cache object at 0x7f968b9046d0> โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ”‚ โ”‚ โ”‚ /home/rhack/.local/share/pipx/venvs/shell-gpt/lib64/python3.11/site-packages/sgpt/handlers/handl โ”‚ โ”‚ er.py:99 in get_completion โ”‚ โ”‚ โ”‚ โ”‚ 96 โ”‚ โ”‚ if is_shell_role or is_code_role or is_dsc_shell_role: โ”‚ โ”‚ 97 โ”‚ โ”‚ โ”‚ functions = None โ”‚ โ”‚ 98 โ”‚ โ”‚ โ”‚ โ”‚ โฑ 99 โ”‚ โ”‚ response = completion( โ”‚ โ”‚ 100 โ”‚ โ”‚ โ”‚ model=model, โ”‚ โ”‚ 101 โ”‚ โ”‚ โ”‚ temperature=temperature, โ”‚ โ”‚ 102 โ”‚ โ”‚ โ”‚ top_p=top_p, โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ arguments = '' โ”‚ โ”‚ โ”‚ โ”‚ functions = None โ”‚ โ”‚ โ”‚ โ”‚ is_code_role = False โ”‚ โ”‚ โ”‚ โ”‚ is_dsc_shell_role = False โ”‚ โ”‚ โ”‚ โ”‚ is_shell_role = False โ”‚ โ”‚ โ”‚ โ”‚ messages = [ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ { โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'role': 'system', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'content': 'You are ShellGPT\nYou are programming and system โ”‚ โ”‚ โ”‚ โ”‚ administration assistant.\nYou ar'+284 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ }, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ {'role': 'user', 'content': ''} โ”‚ โ”‚ โ”‚ โ”‚ ] โ”‚ โ”‚ โ”‚ โ”‚ model = 'gpt-4-1106-preview' โ”‚ โ”‚ โ”‚ โ”‚ name = '' โ”‚ โ”‚ โ”‚ โ”‚ self = <sgpt.handlers.default_handler.DefaultHandler object at 0x7f968b907550> โ”‚ โ”‚ โ”‚ โ”‚ temperature = 0.0 โ”‚ โ”‚ โ”‚ โ”‚ top_p = 1.0 โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ”‚ โ”‚ โ”‚ /home/rhack/.local/share/pipx/venvs/shell-gpt/lib64/python3.11/site-packages/openai/_utils/_util โ”‚ โ”‚ s.py:274 in wrapper โ”‚ โ”‚ โ”‚ โ”‚ 271 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ else: โ”‚ โ”‚ 272 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ msg = f"Missing required argument: {quote(missing[0])}" โ”‚ โ”‚ 273 โ”‚ โ”‚ โ”‚ โ”‚ raise TypeError(msg) โ”‚ โ”‚ โฑ 274 โ”‚ โ”‚ โ”‚ return func(*args, **kwargs) โ”‚ โ”‚ 275 โ”‚ โ”‚ โ”‚ โ”‚ 276 โ”‚ โ”‚ return wrapper # type: ignore โ”‚ โ”‚ 277 โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ _ = <openai.resources.chat.completions.Completions object at 0x7f968b9044d0> โ”‚ โ”‚ โ”‚ โ”‚ args = (<openai.resources.chat.completions.Completions object at 0x7f968b9044d0>,) โ”‚ โ”‚ โ”‚ โ”‚ func = <function Completions.create at 0x7f968baec900> โ”‚ โ”‚ โ”‚ โ”‚ given_params = {'model', 'temperature', 'stream', 'top_p', 'functions', 'messages', 'self'} โ”‚ โ”‚ โ”‚ โ”‚ i = 0 โ”‚ โ”‚ โ”‚ โ”‚ key = 'stream' โ”‚ โ”‚ โ”‚ โ”‚ kwargs = { โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'model': 'gpt-4-1106-preview', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'temperature': 0.0, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'top_p': 1.0, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'messages': [ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ { โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'role': 'system', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'content': 'You are ShellGPT\nYou are programming and system โ”‚ โ”‚ โ”‚ โ”‚ administration assistant.\nYou ar'+284 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ }, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ {'role': 'user', 'content': ''} โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ ], โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'functions': None, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'stream': True โ”‚ โ”‚ โ”‚ โ”‚ } โ”‚ โ”‚ โ”‚ โ”‚ matches = True โ”‚ โ”‚ โ”‚ โ”‚ positional = ['self'] โ”‚ โ”‚ โ”‚ โ”‚ variant = ['messages', 'model'] โ”‚ โ”‚ โ”‚ โ”‚ variants = (['messages', 'model'], ['messages', 'model', 'stream']) โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ”‚ โ”‚ โ”‚ /home/rhack/.local/share/pipx/venvs/shell-gpt/lib64/python3.11/site-packages/openai/resources/ch โ”‚ โ”‚ at/completions.py:668 in create โ”‚ โ”‚ โ”‚ โ”‚ 665 โ”‚ โ”‚ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, โ”‚ โ”‚ 666 โ”‚ ) -> ChatCompletion | Stream[ChatCompletionChunk]: โ”‚ โ”‚ 667 โ”‚ โ”‚ validate_response_format(response_format) โ”‚ โ”‚ โฑ 668 โ”‚ โ”‚ return self._post( โ”‚ โ”‚ 669 โ”‚ โ”‚ โ”‚ "/chat/completions", โ”‚ โ”‚ 670 โ”‚ โ”‚ โ”‚ body=maybe_transform( โ”‚ โ”‚ 671 โ”‚ โ”‚ โ”‚ โ”‚ { โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ extra_body = None โ”‚ โ”‚ โ”‚ โ”‚ extra_headers = None โ”‚ โ”‚ โ”‚ โ”‚ extra_query = None โ”‚ โ”‚ โ”‚ โ”‚ frequency_penalty = NOT_GIVEN โ”‚ โ”‚ โ”‚ โ”‚ function_call = NOT_GIVEN โ”‚ โ”‚ โ”‚ โ”‚ functions = None โ”‚ โ”‚ โ”‚ โ”‚ logit_bias = NOT_GIVEN โ”‚ โ”‚ โ”‚ โ”‚ logprobs = NOT_GIVEN โ”‚ โ”‚ โ”‚ โ”‚ max_tokens = NOT_GIVEN โ”‚ โ”‚ โ”‚ โ”‚ messages = [ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ { โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'role': 'system', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'content': 'You are ShellGPT\nYou are programming and system โ”‚ โ”‚ โ”‚ โ”‚ administration assistant.\nYou ar'+284 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ }, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ {'role': 'user', 'content': ''} โ”‚ โ”‚ โ”‚ โ”‚ ] โ”‚ โ”‚ โ”‚ โ”‚ model = 'gpt-4-1106-preview' โ”‚ โ”‚ โ”‚ โ”‚ n = NOT_GIVEN โ”‚ โ”‚ โ”‚ โ”‚ parallel_tool_calls = NOT_GIVEN โ”‚ โ”‚ โ”‚ โ”‚ presence_penalty = NOT_GIVEN โ”‚ โ”‚ โ”‚ โ”‚ response_format = NOT_GIVEN โ”‚ โ”‚ โ”‚ โ”‚ seed = NOT_GIVEN โ”‚ โ”‚ โ”‚ โ”‚ self = <openai.resources.chat.completions.Completions object at โ”‚ โ”‚ โ”‚ โ”‚ 0x7f968b9044d0> โ”‚ โ”‚ โ”‚ โ”‚ service_tier = NOT_GIVEN โ”‚ โ”‚ โ”‚ โ”‚ stop = NOT_GIVEN โ”‚ โ”‚ โ”‚ โ”‚ stream = True โ”‚ โ”‚ โ”‚ โ”‚ stream_options = NOT_GIVEN โ”‚ โ”‚ โ”‚ โ”‚ temperature = 0.0 โ”‚ โ”‚ โ”‚ โ”‚ timeout = NOT_GIVEN โ”‚ โ”‚ โ”‚ โ”‚ tool_choice = NOT_GIVEN โ”‚ โ”‚ โ”‚ โ”‚ tools = NOT_GIVEN โ”‚ โ”‚ โ”‚ โ”‚ top_logprobs = NOT_GIVEN โ”‚ โ”‚ โ”‚ โ”‚ top_p = 1.0 โ”‚ โ”‚ โ”‚ โ”‚ user = NOT_GIVEN โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ”‚ โ”‚ โ”‚ /home/rhack/.local/share/pipx/venvs/shell-gpt/lib64/python3.11/site-packages/openai/_base_client โ”‚ โ”‚ .py:1259 in post โ”‚ โ”‚ โ”‚ โ”‚ 1256 โ”‚ โ”‚ opts = FinalRequestOptions.construct( โ”‚ โ”‚ 1257 โ”‚ โ”‚ โ”‚ method="post", url=path, json_data=body, files=to_httpx_files(files), **opti โ”‚ โ”‚ 1258 โ”‚ โ”‚ ) โ”‚ โ”‚ โฑ 1259 โ”‚ โ”‚ return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=str โ”‚ โ”‚ 1260 โ”‚ โ”‚ โ”‚ 1261 โ”‚ def patch( โ”‚ โ”‚ 1262 โ”‚ โ”‚ self, โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ body = { โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'messages': [ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ { โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'role': 'system', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'content': 'You are ShellGPT\nYou are programming and system โ”‚ โ”‚ โ”‚ โ”‚ administration assistant.\nYou ar'+284 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ }, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ {'role': 'user', 'content': ''} โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ ], โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'model': 'gpt-4-1106-preview', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'frequency_penalty': NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'function_call': NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'functions': None, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'logit_bias': NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'logprobs': NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'max_tokens': NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'n': NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'parallel_tool_calls': NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ ... +13 โ”‚ โ”‚ โ”‚ โ”‚ } โ”‚ โ”‚ โ”‚ โ”‚ cast_to = <class 'openai.types.chat.chat_completion.ChatCompletion'> โ”‚ โ”‚ โ”‚ โ”‚ files = None โ”‚ โ”‚ โ”‚ โ”‚ options = {} โ”‚ โ”‚ โ”‚ โ”‚ opts = FinalRequestOptions( โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ method='post', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ url='/chat/completions', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ params={}, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ headers=NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ max_retries=NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ timeout=NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ files=None, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ idempotency_key=None, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ post_parser=NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ json_data={ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'messages': [ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ { โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'role': 'system', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'content': 'You are ShellGPT\nYou are programming and system โ”‚ โ”‚ โ”‚ โ”‚ administration assistant.\nYou ar'+284 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ }, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ {'role': 'user', 'content': ''} โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ ], โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'model': 'gpt-4-1106-preview', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'functions': None, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'stream': True, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'temperature': 0.0, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'top_p': 1.0 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ }, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ extra_json=None โ”‚ โ”‚ โ”‚ โ”‚ ) โ”‚ โ”‚ โ”‚ โ”‚ path = '/chat/completions' โ”‚ โ”‚ โ”‚ โ”‚ self = <openai.OpenAI object at 0x7f968d63cf50> โ”‚ โ”‚ โ”‚ โ”‚ stream = True โ”‚ โ”‚ โ”‚ โ”‚ stream_cls = openai.Stream[openai.types.chat.chat_completion_chunk.ChatCompletionChunk] โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ”‚ โ”‚ โ”‚ /home/rhack/.local/share/pipx/venvs/shell-gpt/lib64/python3.11/site-packages/openai/_base_client โ”‚ โ”‚ .py:936 in request โ”‚ โ”‚ โ”‚ โ”‚ 933 โ”‚ โ”‚ stream: bool = False, โ”‚ โ”‚ 934 โ”‚ โ”‚ stream_cls: type[_StreamT] | None = None, โ”‚ โ”‚ 935 โ”‚ ) -> ResponseT | _StreamT: โ”‚ โ”‚ โฑ 936 โ”‚ โ”‚ return self._request( โ”‚ โ”‚ 937 โ”‚ โ”‚ โ”‚ cast_to=cast_to, โ”‚ โ”‚ 938 โ”‚ โ”‚ โ”‚ options=options, โ”‚ โ”‚ 939 โ”‚ โ”‚ โ”‚ stream=stream, โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ cast_to = <class 'openai.types.chat.chat_completion.ChatCompletion'> โ”‚ โ”‚ โ”‚ โ”‚ options = FinalRequestOptions( โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ method='post', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ url='/chat/completions', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ params={}, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ headers=NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ max_retries=NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ timeout=NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ files=None, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ idempotency_key=None, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ post_parser=NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ json_data={ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'messages': [ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ { โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'role': 'system', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'content': 'You are ShellGPT\nYou are programming and โ”‚ โ”‚ โ”‚ โ”‚ system administration assistant.\nYou ar'+284 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ }, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ {'role': 'user', 'content': ''} โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ ], โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'model': 'gpt-4-1106-preview', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'functions': None, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'stream': True, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'temperature': 0.0, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'top_p': 1.0 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ }, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ extra_json=None โ”‚ โ”‚ โ”‚ โ”‚ ) โ”‚ โ”‚ โ”‚ โ”‚ remaining_retries = None โ”‚ โ”‚ โ”‚ โ”‚ self = <openai.OpenAI object at 0x7f968d63cf50> โ”‚ โ”‚ โ”‚ โ”‚ stream = True โ”‚ โ”‚ โ”‚ โ”‚ stream_cls = openai.Stream[openai.types.chat.chat_completion_chunk.ChatCompletionChuโ€ฆ โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ”‚ โ”‚ โ”‚ /home/rhack/.local/share/pipx/venvs/shell-gpt/lib64/python3.11/site-packages/openai/_base_client โ”‚ โ”‚ .py:1040 in _request โ”‚ โ”‚ โ”‚ โ”‚ 1037 โ”‚ โ”‚ โ”‚ โ”‚ err.response.read() โ”‚ โ”‚ 1038 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 1039 โ”‚ โ”‚ โ”‚ log.debug("Re-raising status error") โ”‚ โ”‚ โฑ 1040 โ”‚ โ”‚ โ”‚ raise self._make_status_error_from_response(err.response) from None โ”‚ โ”‚ 1041 โ”‚ โ”‚ โ”‚ โ”‚ 1042 โ”‚ โ”‚ return self._process_response( โ”‚ โ”‚ 1043 โ”‚ โ”‚ โ”‚ cast_to=cast_to, โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ cast_to = <class 'openai.types.chat.chat_completion.ChatCompletion'> โ”‚ โ”‚ โ”‚ โ”‚ input_options = FinalRequestOptions( โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ method='post', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ url='/chat/completions', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ params={}, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ headers=NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ max_retries=NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ timeout=NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ files=None, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ idempotency_key=None, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ post_parser=NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ json_data={ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'messages': [ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ { โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'role': 'system', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'content': 'You are ShellGPT\nYou are programming and โ”‚ โ”‚ โ”‚ โ”‚ system administration assistant.\nYou ar'+284 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ }, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ {'role': 'user', 'content': ''} โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ ], โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'model': 'gpt-4-1106-preview', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'functions': None, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'stream': True, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'temperature': 0.0, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'top_p': 1.0 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ }, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ extra_json=None โ”‚ โ”‚ โ”‚ โ”‚ ) โ”‚ โ”‚ โ”‚ โ”‚ kwargs = {} โ”‚ โ”‚ โ”‚ โ”‚ options = FinalRequestOptions( โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ method='post', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ url='/chat/completions', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ params={}, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ headers=NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ max_retries=NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ timeout=NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ files=None, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ idempotency_key=None, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ post_parser=NOT_GIVEN, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ json_data={ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'messages': [ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ { โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'role': 'system', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'content': 'You are ShellGPT\nYou are programming and โ”‚ โ”‚ โ”‚ โ”‚ system administration assistant.\nYou ar'+284 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ }, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ {'role': 'user', 'content': ''} โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ ], โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'model': 'gpt-4-1106-preview', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'functions': None, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'stream': True, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'temperature': 0.0, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'top_p': 1.0 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ }, โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ extra_json=None โ”‚ โ”‚ โ”‚ โ”‚ ) โ”‚ โ”‚ โ”‚ โ”‚ remaining_retries = None โ”‚ โ”‚ โ”‚ โ”‚ request = <Request('POST', 'https://api.openai.com/v1/chat/completions')> โ”‚ โ”‚ โ”‚ โ”‚ response = <Response [401 Unauthorized]> โ”‚ โ”‚ โ”‚ โ”‚ retries = 2 โ”‚ โ”‚ โ”‚ โ”‚ self = <openai.OpenAI object at 0x7f968d63cf50> โ”‚ โ”‚ โ”‚ โ”‚ stream = True โ”‚ โ”‚ โ”‚ โ”‚ stream_cls = openai.Stream[openai.types.chat.chat_completion_chunk.ChatCompletionChuโ€ฆ โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ AuthenticationError: Error code: 401 - {'error': {'message': 'Incorrect API key provided: sk-proj-************************************************************************************************************************************************************vgWF. You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}}

richardstevenhack avatar Aug 10 '24 21:08 richardstevenhack

how are your variables configured on .config/shell_gpt/.sgptrc?

lucasliet avatar Dec 06 '24 17:12 lucasliet

try set a dummy key for OPENAI_API_KEY, there as PR to fix this but is a handle for now

lucasliet avatar Dec 06 '24 17:12 lucasliet