-
Notifications
You must be signed in to change notification settings - Fork 7
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
unable to generate quiz due to code #20
Comments
Can you try again? I just tested it myself and both the Command R and Command R+ models worked on the first try. If it still doesn't work after multiple attempts, can you provide the model you used, the token count of your notes, and the type and number of questions you tried to generate? |
Hey there! |
How many tokens was the note and how many questions were you trying to generate? |
The new one was 24088 tokens. |
How many questions did you try to generate? |
I clicked on "Generate Quiz" with the standard settings, so 7. |
Ok, I'll look into it. |
Hey, just a heads up: I still have this problem. |
I did some testing and turns out Cohere's models return nothing if your prompt exceeds ~4000 tokens. Note that this number can vary depending on the content of your notes because I use an extremely simple tokenizer which doesn't perfectly reflect how actual models tokenize inputs. I plan to fix this by breaking down large inputs into chunks and processing each one separately. But in the meantime, I recommend either keeping each generation request under 4000 tokens, or using Google Gemini which can easily handle tens of thousands of tokens. |
Thanks! So I tried to test it with Gemini just now and I got the same error... |
That's surprising. I just tried with 80,000 tokens and had no issues. What generation language are you using and did your selected notes contain any "special" text (code, LaTeX, tables, non-English characters, embeds, etc.)? |
I use german as the language for the questions to be generated in. |
I just tried again using German as the generation language and even translated my notes into German but didn't have any problems, so this is really strange. Are you using the default Google API base URL or a third-party API? That seems like the only factor left that hasn't been considered. |
I have not changed anything about the default API... Thank you for your efforts! |
I've attached a custom build of the latest release which has some logging for Cohere and Gemini. Go to Edit: For some reason Windows Defender flags it as a virus when I tried downloading it even though I made the file so let me know if you can't download it. Edit2: I found a workaround by replacing the zip file with a |
Hey there! Check out this log: Quiz Generator is only in the last few lines |
Thanks for the logs. I'm able to reproduce the bug with Cohere so I'll put out a fix for that soon. Are you able to also send the logs when you try generating with Gemini? I can't get Gemini to fail no matter how many tokens I use so it'd be very helpful to see what error you're getting. |
Hey there, and another log with Cohere: |
I used Cohere to get an API key.
When I click generate quiz I get:
Expected ',' or '}' after property value in JSON at position 2365
The text was updated successfully, but these errors were encountered: