-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Custom instructions feature #3597
Custom instructions feature #3597
Conversation
It utilises two additional fields in work_parameters: - user_profile (here user would describe what he wants to share with llm, for chat session) - user_response_instructions (here user would describe how want to llm respond to questions and queries, like format, style, lengt etc...)
It utilises two additional fields in work_parameters: - user_profile (here user would describe what he wants to share with llm, for chat session) - user_response_instructions (here user would describe how want to llm respond to questions and queries, like format, style, lengt etc...)
Co-authored-by: Oliver Stanley <olivergestanley@gmail.com>
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.
Inference backend/worker changes lgtm (have not reviewed frontend changes)
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.
I haven't run the code yet but overall it looks good. Just one small thing to clean up the code and avoid re-render. Feel free to merge if you can't make it work with react-hook-form.
const [customInstructions, setCustomInstructions] = useState<CustomInstructionsType>({ | ||
user_profile: "", | ||
user_response_instructions: "", | ||
}); |
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.
This state can be handled by react-hook-form. You just need to wrap the CustomInstructions
with the Controller
component.
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.
Thanks, could you please provide a commit/change for that here if you have time and it's small(I am not sure how to wrap it with Controller)?
Added basic functionality of "custom-instructions"
It utilises two additional fields in work_parameters:
llm, for chat session)
respond to questions and queries, like format, style, length, etc...)
Here are some of the current UI changes introduced with this PR.
Custom instructions