Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Captions is not iterable #7

Closed
akeslo opened this issue Dec 12, 2023 · 11 comments
Closed

Captions is not iterable #7

akeslo opened this issue Dec 12, 2023 · 11 comments

Comments

@akeslo
Copy link

akeslo commented Dec 12, 2023

image
@Sweetdevil144
Copy link
Owner

Lemme take a look into it !!

@Sweetdevil144
Copy link
Owner

Fixed !! (:

@akeslo
Copy link
Author

akeslo commented Jan 5, 2024

@Sweetdevil144 Thanks for the efforts here, I am for some reason still seeing the error. Do you have an example youtube url that works?

image

@Sweetdevil144
Copy link
Owner

Hey @akeslo. Can you try the following :
If you scrounge within fetchresults.js, you'll find the lines :

        model: "gpt-4-1106-preview",
        // model: "gpt-3.5-turbo-16k",

Try degrading the model to gpt-3.5
The error arises because your current gpt key is not meant to work with gpt-4 because it requires an organisation's permission.
After that, it should work perfectly fine.

@akeslo
Copy link
Author

akeslo commented Jan 5, 2024

Weird, I swapped that but same error.

Do I need to define anything more in my .env?

OPENAI_API_KEY=sk-xxxxkeyhere
Rapid_API_KEY=355keyhere

@Sweetdevil144 Sweetdevil144 reopened this Jan 5, 2024
@Sweetdevil144
Copy link
Owner

I don't think I can catch that. Try one thing. log the API keys in your background in fetchresults.js and youtube.js and check whether they are correctly fetched or not. Try using the website Linked within the repository..I think the repository works pretty fine. If that too doesn't works, try logging all responses and errors recieved and sent to openai in API calls. Check if the captions are correctly fetched or not. Sometimes your keys expire so it's difficult to find errors. If nothing works try contacting me again. If possible, can you file a PR too given you find the cause of the problem? It would be a great contribution to our repository. Also, try using nodemon instead of node.

@akeslo
Copy link
Author

akeslo commented Jan 6, 2024

@Sweetdevil144 Is this supposed to work on all youtube URLs or is there a specific requirement from a caption perspective? I've tried it across several but no luck even with the website linked in the repo. Same error from the website:

image

@Sweetdevil144
Copy link
Owner

Thanks for insights @akeslo. Let me take a look into this issue.

Is this supposed to work on all youtube URLs

Yes, this is supposed to work on all shorts.

@Sweetdevil144
Copy link
Owner

Seems like my credits of openai have expired on the website. I've improved the log messages on the source code. Can you verify it with your code logs again?

@Sweetdevil144
Copy link
Owner

Any updates @akeslo ?

@akeslo
Copy link
Author

akeslo commented Jan 11, 2024

Sorry for the delay @Sweetdevil144, I am still seeing the same error with the latest code:

╰─$ node app.js
Server is running on port 3000
transcript fetched
Caught error in app.js
An Error occurred -> TypeError: captions is not iterable
transcript fetched
Caught error in app.js
An Error occurred -> TypeError: captions is not iterable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants