Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

Use a customized CHATGPT_BASE_URL for V1. #1251

Closed
hongyi-zhao opened this issue Apr 2, 2023 · 2 comments
Closed

Use a customized CHATGPT_BASE_URL for V1. #1251

hongyi-zhao opened this issue Apr 2, 2023 · 2 comments
Labels
invalid This doesn't seem right

Comments

@hongyi-zhao
Copy link

hongyi-zhao commented Apr 2, 2023

I try to test a customized CHATGPT_BASE_URL for V1 using the reverse-proxy https://api.pawan.krd/backend-api as follows, but failed:

$ CHATGPT_BASE_URL=https://api.pawan.krd/backend-api python3 -m revChatGPT.V1

        ChatGPT - A command-line interface to OpenAI's ChatGPT (https://chat.openai.com/chat)
        Repo: github.com/acheong08/ChatGPT
        
Type '!help' to show a full list of commands
Press Esc followed by Enter or Alt+Enter to send a message.

You: 
Hello.

Chatbot: 
{"status":false,"error":"Invalid API key","hint":"You can get an API key from https://discord.pawan.krd","info":"https://gist.github.com/PawanOsman/72dddd0a12e5829da664a43fc9b9cf9a","support":"https://discord.pawan.krd"}
Traceback (most recent call last):
  File "/home/werner/Public/repo/github.com/acheong08/ChatGPT.git/src/revChatGPT/V1.py", line 962, in main
    for data in chatbot.ask(prompt):
  File "/home/werner/Public/repo/github.com/acheong08/ChatGPT.git/src/revChatGPT/V1.py", line 449, in ask
    self.__check_response(response)
  File "/home/werner/Public/repo/github.com/acheong08/ChatGPT.git/src/revChatGPT/V1.py", line 58, in wrapper
    out = func(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^
  File "/home/werner/Public/repo/github.com/acheong08/ChatGPT.git/src/revChatGPT/V1.py", line 557, in __check_response
    raise error
revChatGPT.typings.Error: OpenAI: {"status":false,"error":"Invalid API key","hint":"You can get an API key from https://discord.pawan.krd","info":"https://gist.github.com/PawanOsman/72dddd0a12e5829da664a43fc9b9cf9a","support":"https://discord.pawan.krd"} (code: 400)
Please check that the input is correct, or you can resolve this issue by filing an issue
Project URL: https://github.com/acheong08/ChatGPT

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/werner/Public/repo/github.com/acheong08/ChatGPT.git/src/revChatGPT/V1.py", line 986, in <module>
    main(configure())
  File "/home/werner/Public/repo/github.com/acheong08/ChatGPT.git/src/revChatGPT/V1.py", line 58, in wrapper
    out = func(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^
  File "/home/werner/Public/repo/github.com/acheong08/ChatGPT.git/src/revChatGPT/V1.py", line 972, in main
    raise error from e
revChatGPT.typings.CLIError: command line program unknown error
Please check that the input is correct, or you can resolve this issue by filing an issue
Project URL: https://github.com/acheong08/ChatGPT

If I remember correctly, V1 doesn't support API key, so I wonder how to obtain the corresponding "access_token" for this alternative reverse proxy to make the configuration file for V1.

@acheong08
Copy link
Owner

Not supported.

@acheong08 acheong08 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 2, 2023
@acheong08 acheong08 added the invalid This doesn't seem right label Apr 2, 2023
@acheong08
Copy link
Owner

Open an issue on the alternative proxy's repo

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants