You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A "grammar instance" (created on line 28) is what contains the state in a grammar, so after one response that instance has reached the end and there are no valid tokens to be sampled!
Every time you want to start a new response you need a fresh grammar instance, to reset that state back to the start.
If you'd like to submit a PR to fix that I'll be happy to review and merge it for you :)
Description
I've created a Model following this Example:
GrammarJsonResponse.cs
I'm using the provided grammar, which forces the model to respond in JSON
This works great for the first prompt, but for any subsequent prompt, the response is just Empty
Reproduction Steps
Execute the Code in Example:
GrammarJsonResponse.cs
Write 2 Prompts
=> See: second Prompt is Empty
Environment & Configuration
Known Workarounds
No response
The text was updated successfully, but these errors were encountered: