-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Allows User to Set System Prompt via "Additional Options" in Chat Interface #1353
Allows User to Set System Prompt via "Additional Options" in Chat Interface #1353
Conversation
…ns' of chat interface
…nd add some code documentation.
…Update minor comment in ui.py
Published docs preview URL: https://privategpt-preview-2fefa696-9478-4767-be21-0c34a99f4e23.docs.buildwithfern.com |
I'm noticing the preview docs published above do not contain the changes I have in |
Published docs preview URL: https://privategpt-preview-76ffd262-9fe2-4c6f-a69d-f057bcda8472.docs.buildwithfern.com |
…ly add system prompt as a system message if prompt is defined. Add new settings fields "default_query_system_prompt" and "default_chat_system_prompt". Updated documentation with new settings and minor corrections.
Published docs preview URL: https://privategpt-preview-a79a730a-1574-4b26-ac12-da4dfa494428.docs.buildwithfern.com |
Published docs preview URL: https://privategpt-preview-9cf3f051-2b05-4456-aecd-c780424d7ebe.docs.buildwithfern.com |
Published docs preview URL: https://privategpt-preview-465179a2-2a76-4e1e-b087-68bb595c1833.docs.buildwithfern.com |
@@ -30,6 +30,8 @@ | |||
|
|||
SOURCES_SEPARATOR = "\n\n Sources: \n" | |||
|
|||
MODES = ["Query Docs", "Search in Docs", "LLM Chat"] |
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.
Note for a later refactoring: this could be replaced by an enum.Enum
class.
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.
Looks good to me !
As discussed on Discord, the decision has been made to remove the system prompts by default, to better segregate the API and the UI usages. A concurrent PR (zylon-ai#1353) is enabling the dynamic setting of a system prompt in the UI. Therefore, if UI users want to use a custom system prompt, they can specify one directly in the UI. If the API users want to use a custom prompt, they can pass it directly into their messages that they are passing to the API. In the highlight of the two use case above, it becomes clear that default system_prompt does not need to exist.
As discussed on Discord, the decision has been made to remove the system prompts by default, to better segregate the API and the UI usages. A concurrent PR (#1353) is enabling the dynamic setting of a system prompt in the UI. Therefore, if UI users want to use a custom system prompt, they can specify one directly in the UI. If the API users want to use a custom prompt, they can pass it directly into their messages that they are passing to the API. In the highlight of the two use case above, it becomes clear that default system_prompt does not need to exist.
…orrect settings field.
Published docs preview URL: https://privategpt-preview-f1171899-0acc-4146-bf9b-c9c672685f49.docs.buildwithfern.com |
Published docs preview URL: https://privategpt-preview-cbe3354e-99ed-4b53-a829-ec988bc81bcf.docs.buildwithfern.com |
…-prompt # Conflicts: # private_gpt/components/llm/llm_component.py # private_gpt/settings/settings.py
Published docs preview URL: https://privategpt-preview-59684197-825d-4091-9bd5-db55375c6fb3.docs.buildwithfern.com |
…nd update settings.py comments for new fields. Removed usage of llama_index.DEFAULT_SYSTEM_PROMPT.
Published docs preview URL: https://privategpt-preview-d5767898-b32c-45e1-891d-1b4068eb91c8.docs.buildwithfern.com |
Published docs preview URL: https://privategpt-preview-3fd8e67d-7886-4082-b253-120addc5fad5.docs.buildwithfern.com |
…els hyperlink. Remove redundant () in settings.py.
Published docs preview URL: https://privategpt-preview-2cb1d7d8-3341-4a9e-a8c2-39060189b9bd.docs.buildwithfern.com |
@imartinez I believe this is (finally) ready to PR... Please let me know if there are any other suggestions or findings. Thank you! |
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.
LGTM!
As discussed on Discord, the decision has been made to remove the system prompts by default, to better segregate the API and the UI usages. A concurrent PR (zylon-ai#1353) is enabling the dynamic setting of a system prompt in the UI. Therefore, if UI users want to use a custom system prompt, they can specify one directly in the UI. If the API users want to use a custom prompt, they can pass it directly into their messages that they are passing to the API. In the highlight of the two use case above, it becomes clear that default system_prompt does not need to exist.
This PR allows users to set the system prompt from within the gradio interface (#1329). The default system prompt shows up as a
placeholder
to the input box, and the user may choose to override it.I plan to add some documentation updates that provide example prompts, and these updates could be linked to from the gradio interface.
Recording.2023-12-01.142954.mp4