Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the issue of multiline
bot say
parameter, which could be a follow-up problem of the #748. Consider the following application:After the kid-friendly movies are printed, if the user intent is undefined, the call to LLM's prompt would include this:
which is misleading for few-shot learning. This leads to a generation like:
First of all, the first line which is considered a flow name is syntactically incorrect. This PR escapes non-word chars in generated flow names. Secondly, the correct generation should be like:
This PR converts new lines in params to
\n
tokens to fix this problem.