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
568 stars 119 forks source link

Error with finding gpt-4 model. I have the access to using gpt-4, but am not able to access it. #4

Closed Sweetdevil144 closed 1 year ago

Sweetdevil144 commented 1 year ago

raise self.handle_error_response( openai.error.InvalidRequestError: The model: gpt-4 does not exist

GuilhermeSBlanco commented 1 year ago

having the same issue bro, did you find out how to fix?

GuilhermeSBlanco commented 1 year ago

image

Sweetdevil144 commented 1 year ago

having the same issue bro, did you find out how to fix?

Not right now but I hope I'll soon find one. I thought using gpt-4-8k would solve the problem but it didn't even bulge and gave this error. The modelgpt-4-8kdoes not exist.

Then I tried to increase the token count by using gpt-3.5-turbo-16k which doubled it to 8k tokens.

Sweetdevil144 commented 1 year ago

I think one possible approach may lie in splitting the video first into multiple segments and then re-examining the videos. What do you think about this @GuilhermeSBlanco

NisaarAgharia commented 1 year ago

The issue is with context length.

The longer the video the bigger the transcripts.

Ideally the transcript should be split in chunks and then processed one by one.

I will be rewriting the code with langchain soon.

If you are getting token limit exceeded try with smaller videos of 5 mins.

I have access to gpt3.5 16k and gpt4 8k.

GuilhermeSBlanco commented 1 year ago

do you guys know a way to access gpt4 without paying for it? i'm brazillian and it's kind expansive for me

Sweetdevil144 commented 1 year ago

do you guys know a way to access gpt4 without paying for it? i'm brazillian and it's kind expansive for me

No buddy, you can't. You can try gpt-3.5-16k turbo version to increase the token count.