Use OpenAI's API for Free

Sdílet
Vložit
  • čas přidán 30. 06. 2024
  • This video tutorial guides viewers through the process of making free API calls to OpenAI's GPT-3.5 Turbo using a reverse proxy setup, avoiding the need for subscription fees. The host explains the pricing structure for OpenAI's services and introduces a GitHub project, named ChadGPT, that serves as a free reverse proxy specifically for the GPT-3.5 Turbo model. The tutorial covers step-by-step instructions for setting up the proxy using Docker and demonstrates how to test the setup by making API calls, ultimately offering a budget-friendly solution for developers wanting to prototype with OpenAI without upfront costs.
    00:00 Introduction to the Project
    00:18 Understanding OpenAI's API and Pricing
    01:28 Discovering a Free Proxy Solution
    02:01 Setting Up the Docker Environment
    02:52 Executing the Proxy with Docker
    04:22 Testing the Setup with a Python Script
    06:29 Analyzing the Response and Concluding Thoughts
    07:10 Final Remarks and Invitation for Engagement
    Links used in the video are
    github.com/PawanOsman/ChatGPT
    openai.com/api/pricing
    platform.openai.com/docs/api-...

Komentáře • 20

  • @kirangkumar057
    @kirangkumar057 Před 3 hodinami

    Its not working . print(completion.choices), it printed None. Nothing was fetched. or maybe some error. Please help

  • @unclecode
    @unclecode Před měsícem +4

    Interesting, just its almost 3 to 4 times slower, due to some network handshaking it does before sending it to server

    • @bonsaiilabs
      @bonsaiilabs  Před měsícem +3

      Interesting. In my experiments, it was slow that directly hitting OpenAI API, but that's also because a proxy is sitting in between.

    • @rinokpp1692
      @rinokpp1692 Před 28 dny

      Hey

  • @mr-strange-0w0
    @mr-strange-0w0 Před 9 dny +1

    Is it possible to fine tune this GPT model with this reverse api?

    • @bonsaiilabs
      @bonsaiilabs  Před 9 dny +1

      You won't be able to finetune since you are using OpenAI model. Hope this helps.

  • @user-ze9lc9sk5i
    @user-ze9lc9sk5i Před 20 dny +2

    Is it possible to do free gpt but like python library?

    • @bonsaiilabs
      @bonsaiilabs  Před 20 dny +1

      Yes, at 3:57 of this video, you see the Local Endpoint and Public Endpoint, use any of these in your python code. For making REST api calls, refer to platform.openai.com/docs/api-reference/making-requests. Use the Urls, from the timestamp mentioned in this comment, and any API key. This should work.

    • @user-ze9lc9sk5i
      @user-ze9lc9sk5i Před 19 dny

      @@bonsaiilabs Thanks!

  • @brutely9718
    @brutely9718 Před měsícem +10

    Nonetype" object is not subscriptable .. getting type error

    • @yashagarwal99
      @yashagarwal99 Před měsícem

      Same error

    • @ihitasinha990
      @ihitasinha990 Před měsícem

      only works for US based IP, if you're not in the US, use a VPN

    • @brutely9718
      @brutely9718 Před měsícem

      @@ihitasinha990 no I'm using vpc from US. The error was actually that I need to follow farmat it seems. Anyways I checked nodejs file what's really causing but I'm unable to find it.

    • @brutely9718
      @brutely9718 Před měsícem +2

      Thanks, but even though if I use vpc (ec2) from US it's not possible.. it says you are not sending request in format. If I print whole json

    • @sscoder170
      @sscoder170 Před 19 dny

      @@ihitasinha990not working in USA also getting same error

  • @user-cb7yl4nr6h
    @user-cb7yl4nr6h Před měsícem +2

    Has the free class been cancelled?openai api key

    • @sheepythegamer
      @sheepythegamer Před měsícem

      Pretty sure all of the fresh keys I hoarded suddenly wouldn't work when I knew they had credits

  • @mohamedsameer3549
    @mohamedsameer3549 Před dnem

    Hi i have done the required setups and using the public endpoint, I have submitted the prompt and I am receiving response as "An error occurred. please try again. Additionally, ensure that your request complies with OpenAI's policy." is there anything I missed or should I have to change.

  • @DotSlashA
    @DotSlashA Před 7 dny

    I pretty much followed you but I get this error, any help?
    print(completion.choices[0].message.content)
    ~~~~~~~~~~~~~~~~~~^^^
    TypeError: 'NoneType' object is not subscriptable

    • @kirangkumar057
      @kirangkumar057 Před 3 hodinami

      got some bcz it fetched nothing. maybe its not working