Skip to content

Free ChatGPT Proxy that Works in 2024 (No OpenAI Key Required)

Notifications You must be signed in to change notification settings

nishantshah977/ChatGPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChagtGPT Free Proxy

Build app just like you use OpenAI (ClosedAI) Official API but it's not GPT models, it's Llama.

Model List:

  • meta-llama-3-8b-instruct
  • meta--llama-3-70b-instruct
  • meta-llama-2-8b-instruct
  • meta--llama-2-70b-instruct

Requirememts

  • NSTbrowser
  • NSTbrowser API Key (Free)
  • Node.js

Configuration

git clone https://github.com/nishantshah977/ChatGPT

  • Click on Create Profile, fill up and start
  • Copy it and save it to .env file
  • Get API Key from API Section
npm run start

Usage

Python

import openai

openai.api_key = 'anything'
openai.base_url = "http:https://localhost:3040/v1/"

completion = openai.chat.completions.create(
    model="meta-llama-3-8b-instruct",
    messages=[
        {"role": "user", "content": "How do I list all files in a directory using Python?"},
    ],
)

print(completion.choices[0].message.content)

Javascript

import OpenAI from "openai";

const openai = new OpenAI({
  apiKey: "anything",
  baseURL: "http:https://localhost:3040/v1",
});

const chatCompletion = await openai.chat.completions.create({
  messages: [{ role: "user", content: "Say this is a test" }],
  model: "meta-llama-3-8b-instruct",
});

console.log(chatCompletion.choices[0].message.content);

CURL

curl http:https://localhost:port/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "meta-llama-3-8b-instruct",
    "messages": [
      {
        "role": "system",
        "content": "You are a helpful assistant."
      },
      {
        "role": "user",
        "content": "Who won the world series in 2020?"
      },
      {
        "role": "assistant",
        "content": "The Los Angeles Dodgers won the World Series in 2020."
      },
      {
        "role": "user",
        "content": "Where was it played?"
      }
    ]
  }'

Thanks To

  1. https://github.com/PawanOsman/ChatGPT (Chatgpt Request and Response)
  2. NSTbrowser (Bypass Turnstile)

About

Free ChatGPT Proxy that Works in 2024 (No OpenAI Key Required)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published