NisaarAgharia / AI-Shorts-Creator

AI-Video-Cropper is a Python-based tool that leverages the power of GPT-4 (OpenAI's language model) to automatically analyze videos, extract the most interesting sections, and crop them for improved viewing experience. This project combines the capabilities of GPT-4, FFmpeg, and OpenCV to automate the process of identifying highlights in videos
588 stars 122 forks source link

GPT-4 does not exist or no access #8

Open mrouili opened 1 year ago

mrouili commented 1 year ago

Hello,

I am trying to run this program, I get an error saying that GPT-4 does not exist or I have no access to it. Is there a solution to this issue ? can we use gpt-3.5 instead ? if so where and how do I need to replace it ? i tried replacing "gpt-4" with "gpt-3.5" in the analyze_transcript function but that didn't work and the program said that model gpt-3.5 doesn't exist. What can I do to solve this problem ? thank you

PylenVance commented 1 year ago

Bump. Also facing this

Keats0206 commented 11 months ago

Try "gpt-3.5-turbo-16k"

Keats0206 commented 11 months ago

full list of models here - https://platform.openai.com/docs/models/gpt-3-5

Maitreya-Manjusri commented 10 months ago

OpenAI has updated their usage

from openai import OpenAI

def analyze_transcript(transcript):
    client = OpenAI(api_key='your-key')
    prompt = f"This is a transcript of a video. Please identify the 3 most viral sections from the whole, make sure they are more than 30 seconds in duration,Make Sure you provide extremely accurate timestamps respond only in this format {response_obj}  \n Here is the Transcription:\n{transcript}"
    messages = [
        {"role": "system",
         "content": "You are a ViralGPT helpful assistant."},
        {"role": "user", "content": prompt}
    ]

    response = client.chat.completions.create(
        model="gpt-4",
        messages=messages,
        max_tokens=512,
        n=1,
        stop=None
    )
    return response.choices[0].message