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'}}