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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I cannot make it work.
I have installed it properly using virtual environment but I get lots of errors:
`
(openai) fred@fredmac openai % echo $OPENAI_API_KEY
xxxxx
(openai) fred@fredmac openai % pip install shell-gpt
Requirement already satisfied: shell-gpt in /Users/fred/venv/openai/lib/python3.12/site-packages (1.4.0)
Requirement already satisfied: click<9.0.0,>=7.1.1 in /Users/fred/venv/openai/lib/python3.12/site-packages (from shell-gpt) (8.1.7)
Requirement already satisfied: distro<2.0.0,>=1.8.0 in /Users/fred/venv/openai/lib/python3.12/site-packages (from shell-gpt) (1.9.0)
Requirement already satisfied: instructor<1.0.0,>=0.4.5 in /Users/fred/venv/openai/lib/python3.12/site-packages (from shell-gpt) (0.6.2)
Requirement already satisfied: openai<2.0.0,>=1.6.1 in /Users/fred/venv/openai/lib/python3.12/site-packages (from shell-gpt) (1.13.3)
Requirement already satisfied: rich<14.0.0,>=13.1.0 in /Users/fred/venv/openai/lib/python3.12/site-packages (from shell-gpt) (13.7.1)
Requirement already satisfied: typer<1.0.0,>=0.7.0 in /Users/fred/venv/openai/lib/python3.12/site-packages (from shell-gpt) (0.9.0)
Requirement already satisfied: aiohttp<4.0.0,>=3.9.1 in /Users/fred/venv/openai/lib/python3.12/site-packages (from instructor<1.0.0,>=0.4.5->shell-gpt) (3.9.3)
Requirement already satisfied: docstring-parser<0.16,>=0.15 in /Users/fred/venv/openai/lib/python3.12/site-packages (from instructor<1.0.0,>=0.4.5->shell-gpt) (0.15)
Requirement already satisfied: pydantic<3.0.0,>=2.0.2 in /Users/fred/venv/openai/lib/python3.12/site-packages (from instructor<1.0.0,>=0.4.5->shell-gpt) (2.6.3)
Requirement already satisfied: tenacity<9.0.0,>=8.2.3 in /Users/fred/venv/openai/lib/python3.12/site-packages (from instructor<1.0.0,>=0.4.5->shell-gpt) (8.2.3)
Requirement already satisfied: anyio<5,>=3.5.0 in /Users/fred/venv/openai/lib/python3.12/site-packages (from openai<2.0.0,>=1.6.1->shell-gpt) (4.3.0)
Requirement already satisfied: httpx<1,>=0.23.0 in /Users/fred/venv/openai/lib/python3.12/site-packages (from openai<2.0.0,>=1.6.1->shell-gpt) (0.27.0)
Requirement already satisfied: sniffio in /Users/fred/venv/openai/lib/python3.12/site-packages (from openai<2.0.0,>=1.6.1->shell-gpt) (1.3.1)
Requirement already satisfied: tqdm>4 in /Users/fred/venv/openai/lib/python3.12/site-packages (from openai<2.0.0,>=1.6.1->shell-gpt) (4.66.2)
Requirement already satisfied: typing-extensions<5,>=4.7 in /Users/fred/venv/openai/lib/python3.12/site-packages (from openai<2.0.0,>=1.6.1->shell-gpt) (4.10.0)
Requirement already satisfied: markdown-it-py>=2.2.0 in /Users/fred/venv/openai/lib/python3.12/site-packages (from rich<14.0.0,>=13.1.0->shell-gpt) (3.0.0)
Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /Users/fred/venv/openai/lib/python3.12/site-packages (from rich<14.0.0,>=13.1.0->shell-gpt) (2.17.2)
Requirement already satisfied: aiosignal>=1.1.2 in /Users/fred/venv/openai/lib/python3.12/site-packages (from aiohttp<4.0.0,>=3.9.1->instructor<1.0.0,>=0.4.5->shell-gpt) (1.3.1)
Requirement already satisfied: attrs>=17.3.0 in /Users/fred/venv/openai/lib/python3.12/site-packages (from aiohttp<4.0.0,>=3.9.1->instructor<1.0.0,>=0.4.5->shell-gpt) (23.2.0)
Requirement already satisfied: frozenlist>=1.1.1 in /Users/fred/venv/openai/lib/python3.12/site-packages (from aiohttp<4.0.0,>=3.9.1->instructor<1.0.0,>=0.4.5->shell-gpt) (1.4.1)
Requirement already satisfied: multidict<7.0,>=4.5 in /Users/fred/venv/openai/lib/python3.12/site-packages (from aiohttp<4.0.0,>=3.9.1->instructor<1.0.0,>=0.4.5->shell-gpt) (6.0.5)
Requirement already satisfied: yarl<2.0,>=1.0 in /Users/fred/venv/openai/lib/python3.12/site-packages (from aiohttp<4.0.0,>=3.9.1->instructor<1.0.0,>=0.4.5->shell-gpt) (1.9.4)
Requirement already satisfied: idna>=2.8 in /Users/fred/venv/openai/lib/python3.12/site-packages (from anyio<5,>=3.5.0->openai<2.0.0,>=1.6.1->shell-gpt) (3.6)
Requirement already satisfied: certifi in /Users/fred/venv/openai/lib/python3.12/site-packages (from httpx<1,>=0.23.0->openai<2.0.0,>=1.6.1->shell-gpt) (2024.2.2)
Requirement already satisfied: httpcore==1.* in /Users/fred/venv/openai/lib/python3.12/site-packages (from httpx<1,>=0.23.0->openai<2.0.0,>=1.6.1->shell-gpt) (1.0.4)
Requirement already satisfied: h11<0.15,>=0.13 in /Users/fred/venv/openai/lib/python3.12/site-packages (from httpcore==1.*->httpx<1,>=0.23.0->openai<2.0.0,>=1.6.1->shell-gpt) (0.14.0)
Requirement already satisfied: mdurl~=0.1 in /Users/fred/venv/openai/lib/python3.12/site-packages (from markdown-it-py>=2.2.0->rich<14.0.0,>=13.1.0->shell-gpt) (0.1.2)
Requirement already satisfied: annotated-types>=0.4.0 in /Users/fred/venv/openai/lib/python3.12/site-packages (from pydantic<3.0.0,>=2.0.2->instructor<1.0.0,>=0.4.5->shell-gpt) (0.6.0)
Requirement already satisfied: pydantic-core==2.16.3 in /Users/fred/venv/openai/lib/python3.12/site-packages (from pydantic<3.0.0,>=2.0.2->instructor<1.0.0,>=0.4.5->shell-gpt) (2.16.3)
(openai) fred@fredmac openai % sgpt "which are the rainblow colors"
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/fred/venv/openai/lib/python3.12/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 = 'which are the rainblow colors' │ │
│ │ repl = None │ │
│ │ role = None │ │
│ │ role_class = <sgpt.role.SystemRole object at 0x1075b38f0> │ │
│ │ shell = False │ │
│ │ show_chat = None │ │
│ │ show_role = None │ │
│ │ stdin_passed = False │ │
│ │ temperature = 0.0 │ │
│ │ top_p = 1.0 │ │
│ │ version = None │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ /Users/fred/venv/openai/lib/python3.12/site-packages/sgpt/handlers/handler.py:148 in handle │
│ │
│ 145 │ │ │ caching=caching, │
│ 146 │ │ │ **kwargs, │
│ 147 │ │ ) │
│ ❱ 148 │ │ return self.printer(generator, not disable_stream) │
│ 149 │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ caching = True │ │
│ │ disable_stream = False │ │
│ │ functions = None │ │
│ │ generator = <generator object Cache.call..wrapper at 0x105729ea0> │ │
│ │ kwargs = {} │ │
│ │ messages = [ │ │
│ │ │ { │ │
│ │ │ │ 'role': 'system', │ │
│ │ │ │ 'content': 'You are ShellGPT\nYou are programming and system │ │
│ │ administration assistant.\nYou ar'+277 │ │
│ │ │ }, │ │
│ │ │ {'role': 'user', 'content': 'which are the rainblow colors'} │ │
│ │ ] │ │
│ │ model = 'gpt-4-1106-preview' │ │
│ │ prompt = 'which are the rainblow colors' │ │
│ │ self = <sgpt.handlers.default_handler.DefaultHandler object at 0x107357da0> │ │
│ │ temperature = 0.0 │ │
│ │ top_p = 1.0 │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /Users/fred/venv/openai/lib/python3.12/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 0x105729ea0> │ │
│ │ live = True │ │
│ │ self = <sgpt.printer.MarkdownPrinter object at 0x1074273b0> │ │
│ ╰────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /Users/fred/venv/openai/lib/python3.12/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 0x105729ea0> │ │
│ │ full_completion = '' │ │
│ │ live = <rich.live.Live object at 0x107667590> │ │
│ │ self = <sgpt.printer.MarkdownPrinter object at 0x1074273b0> │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /Users/fred/venv/openai/lib/python3.12/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 0x107357da0>,) │ │
│ │ file = PosixPath('/var/folders/2w/yd57w_r56bzfxh0y33bv4d6c0000gn/T/cache/7f6e88e4dc4c4942… │ │
│ │ func = <function Handler.get_completion at 0x107669d00> │ │
│ │ key = '7f6e88e4dc4c49421120cc329190805e' │ │
│ │ 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'+277 │ │
│ │ │ │ }, │ │
│ │ │ │ {'role': 'user', 'content': 'which are the rainblow colors'} │ │
│ │ │ ], │ │
│ │ │ 'functions': None │ │
│ │ } │ │
│ │ result = '' │ │
│ │ self = <sgpt.cache.Cache object at 0x107665490> │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /Users/fred/venv/openai/lib/python3.12/site-packages/sgpt/handlers/handler.py:99 in │
│ get_completion │
│ │
│ 96 │ │ if is_shell_role or is_code_role or is_dsc_shell_role: │
│ 97 │ │ │ functions = None │
│ 98 │ │ │
│ ❱ 99 │ │ for chunk in 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'+277 │ │
│ │ │ }, │ │
│ │ │ {'role': 'user', 'content': 'which are the rainblow colors'} │ │
│ │ ] │ │
│ │ model = 'gpt-4-1106-preview' │ │
│ │ name = '' │ │
│ │ self = <sgpt.handlers.default_handler.DefaultHandler object at 0x107357da0> │ │
│ │ temperature = 0.0 │ │
│ │ top_p = 1.0 │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /Users/fred/venv/openai/lib/python3.12/site-packages/openai/_utils/_utils.py:275 in wrapper │
│ │
│ 272 │ │ │ │ │ else: │
│ 273 │ │ │ │ │ │ msg = f"Missing required argument: {quote(missing[0])}" │
│ 274 │ │ │ │ raise TypeError(msg) │
│ ❱ 275 │ │ │ return func(*args, **kwargs) │
│ 276 │ │ │
│ 277 │ │ return wrapper # type: ignore │
│ 278 │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ _ = <openai.resources.chat.completions.Completions object at 0x105484680> │ │
│ │ args = (<openai.resources.chat.completions.Completions object at 0x105484680>,) │ │
│ │ func = <function Completions.create at 0x10756afc0> │ │
│ │ given_params = {'self', 'model', 'functions', 'messages', 'top_p', 'temperature', 'stream'} │ │
│ │ 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'+277 │ │
│ │ │ │ }, │ │
│ │ │ │ {'role': 'user', 'content': 'which are the rainblow colors'} │ │
│ │ │ ], │ │
│ │ │ 'functions': None, │ │
│ │ │ 'stream': True │ │
│ │ } │ │
│ │ matches = True │ │
│ │ positional = ['self'] │ │
│ │ variant = ['messages', 'model'] │ │
│ │ variants = (['messages', 'model'], ['messages', 'model', 'stream']) │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /Users/fred/venv/openai/lib/python3.12/site-packages/openai/resources/chat/completions.py:663 in │
│ create │
│ │
│ 660 │ │ extra_body: Body | None = None, │
│ 661 │ │ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, │
│ 662 │ ) -> ChatCompletion | Stream[ChatCompletionChunk]: │
│ ❱ 663 │ │ return self._post( │
│ 664 │ │ │ "/chat/completions", │
│ 665 │ │ │ body=maybe_transform( │
│ 666 │ │ │ │ { │
│ │
│ ╭─────────────────────────────────────────── 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'+277 │ │
│ │ │ }, │ │
│ │ │ {'role': 'user', 'content': 'which are the rainblow colors'} │ │
│ │ ] │ │
│ │ model = 'gpt-4-1106-preview' │ │
│ │ n = NOT_GIVEN │ │
│ │ presence_penalty = NOT_GIVEN │ │
│ │ response_format = NOT_GIVEN │ │
│ │ seed = NOT_GIVEN │ │
│ │ self = <openai.resources.chat.completions.Completions object at 0x105484680> │ │
│ │ stop = NOT_GIVEN │ │
│ │ stream = True │ │
│ │ temperature = 0.0 │ │
│ │ timeout = NOT_GIVEN │ │
│ │ tool_choice = NOT_GIVEN │ │
│ │ tools = NOT_GIVEN │ │
│ │ top_logprobs = NOT_GIVEN │ │
│ │ top_p = 1.0 │ │
│ │ user = NOT_GIVEN │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /Users/fred/venv/openai/lib/python3.12/site-packages/openai/_base_client.py:1200 in post │
│ │
│ 1197 │ │ opts = FinalRequestOptions.construct( │
│ 1198 │ │ │ method="post", url=path, json_data=body, files=to_httpx_files(files), **opti │
│ 1199 │ │ ) │
│ ❱ 1200 │ │ return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=str │
│ 1201 │ │
│ 1202 │ def patch( │
│ 1203 │ │ self, │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ body = { │ │
│ │ │ 'messages': [ │ │
│ │ │ │ { │ │
│ │ │ │ │ 'role': 'system', │ │
│ │ │ │ │ 'content': 'You are ShellGPT\nYou are programming and system │ │
│ │ administration assistant.\nYou ar'+277 │ │
│ │ │ │ }, │ │
│ │ │ │ {'role': 'user', 'content': 'which are the rainblow colors'} │ │
│ │ │ ], │ │
│ │ │ '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, │ │
│ │ │ 'presence_penalty': NOT_GIVEN, │ │
│ │ │ ... +10 │ │
│ │ } │ │
│ │ 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'+277 │ │
│ │ │ │ │ }, │ │
│ │ │ │ │ {'role': 'user', 'content': 'which are the rainblow colors'} │ │
│ │ │ │ ], │ │
│ │ │ │ '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 0x1056c24b0> │ │
│ │ stream = True │ │
│ │ stream_cls = openai.Stream[openai.types.chat.chat_completion_chunk.ChatCompletionChunk] │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /Users/fred/venv/openai/lib/python3.12/site-packages/openai/_base_client.py:889 in request │
│ │
│ 886 │ │ stream: bool = False, │
│ 887 │ │ stream_cls: type[_StreamT] | None = None, │
│ 888 │ ) -> ResponseT | _StreamT: │
│ ❱ 889 │ │ return self._request( │
│ 890 │ │ │ cast_to=cast_to, │
│ 891 │ │ │ options=options, │
│ 892 │ │ │ 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'+277 │ │
│ │ │ │ │ }, │ │
│ │ │ │ │ { │ │
│ │ │ │ │ │ 'role': 'user', │ │
│ │ │ │ │ │ 'content': 'which are the rainblow colors' │ │
│ │ │ │ │ } │ │
│ │ │ │ ], │ │
│ │ │ │ '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 0x1056c24b0> │ │
│ │ stream = True │ │
│ │ stream_cls = openai.Stream[openai.types.chat.chat_completion_chunk.ChatCompletionChu… │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /Users/fred/venv/openai/lib/python3.12/site-packages/openai/_base_client.py:980 in _request │
│ │
│ 977 │ │ │ │ err.response.read() │
│ 978 │ │ │ │
│ 979 │ │ │ log.debug("Re-raising status error") │
│ ❱ 980 │ │ │ raise self._make_status_error_from_response(err.response) from None │
│ 981 │ │ │
│ 982 │ │ return self._process_response( │
│ 983 │ │ │ cast_to=cast_to, │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ cast_to = <class 'openai.types.chat.chat_completion.ChatCompletion'> │ │
│ │ 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'+277 │ │
│ │ │ │ │ }, │ │
│ │ │ │ │ { │ │
│ │ │ │ │ │ 'role': 'user', │ │
│ │ │ │ │ │ 'content': 'which are the rainblow colors' │ │
│ │ │ │ │ } │ │
│ │ │ │ ], │ │
│ │ │ │ '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 [404 Not Found]> │ │
│ │ retries = 2 │ │
│ │ self = <openai.OpenAI object at 0x1056c24b0> │ │
│ │ stream = True │ │
│ │ stream_cls = openai.Stream[openai.types.chat.chat_completion_chunk.ChatCompletionChu… │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
NotFoundError: Error code: 404 - {'error': {'message': 'The model
gpt-4-1106-preview
does not exist or you do not haveaccess to it. Learn more: https://help.openai.com/en/articles/7102672-how-can-i-access-gpt-4.', 'type':
'invalid_request_error', 'param': None, 'code': 'model_not_found'}}
(openai) fred@fredmac openai % `
Beta Was this translation helpful? Give feedback.
All reactions