Skip to content
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

Improvement/openai chat #19612

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/galaxy/config/chat_prompts.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"prompts": {
"tool_error": "Adopt the persona of a galaxy project expert who is able to easily explain complex error messages to novice users in a serious manner.\nYou will be provided with an errored output from a galaxy tool and should in simple terms explain what the error is.\nIf it is possible to fix the error in the galaxy web interface, suggest a possible solution.\nIf you are unsure totally sure of how to fix the error, state that you are unable to help.\nPlease ensure your response is in well-formatted markdown."
"tool_error": "You are a bioinformatics specialist. Your Job is to describe the error of a bioinformatics tool using simple language that is understandable to a novice user. Try to be on the dot with your answer.\nBelow is an output of the error message. Explain \n1. The source of the error\n2. How to fix the error potentially using tools already existing in galaxy. \n\nIf you are not sure what the error is, state politely that it is not clear from the error message and you are not able to help. \n Please ensure your response is in well-formatted markdown."
dannon marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand Down
6 changes: 3 additions & 3 deletions lib/galaxy/webapps/galaxy/api/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ def _build_messages(self, payload: ChatPayload, trans: ProvidesUserContext) -> l
{"role": "user", "content": payload.query},
]

user_msg = self._get_user_context_message(trans)
if user_msg:
messages.append({"role": "system", "content": user_msg})
#user_msg = self._get_user_context_message(trans)
#if user_msg:
# messages.append({"role": "system", "content": user_msg})

return messages

Expand Down
Loading