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.
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
feat: Make suggest next questions configurable #275
feat: Make suggest next questions configurable #275
Changes from 4 commits
0c60f27
2221b50
a82424a
a9ff7d0
0d7077e
05d646f
c18a517
1c91107
9b788f4
06a201e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review of
getTemplateEnvs
function modificationsThe modifications to the
getTemplateEnvs
function introduce a new environment variableNEXT_QUESTION_PROMPT
and extend the function's capability to handle different templates. Here are some observations and suggestions:Correctness: The function correctly checks for the
framework
andtemplate
conditions before returning thenextQuestionEnvs
. This ensures that the environment variables are only added when necessary, which is good for avoiding unnecessary configuration in other scenarios.Maintainability: The function is straightforward and maintains readability with clear condition checks and structured environment variable definitions. However, consider adding more comments explaining why only "multiagent" and "streaming" templates are considered here.
Performance: There are no performance concerns with the current implementation as the operations are primarily conditional checks and array manipulations.
Best Practices: The use of template literals and structured data for environment variables is a good practice. It keeps the code clean and easy to understand.
Potential Improvements:
template
orframework
. Adding error logging or warnings for unexpected values could improve robustness.Overall, the changes align well with the PR objectives and improve the configurability of the next questions feature.
Consider the following refactor for future extensibility and error handling: