From 764e420a0c29681cd412212c774241cf746e8884 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Thu, 27 Jun 2024 14:46:11 +0200 Subject: [PATCH] Add disclaimer display, adjust prompts --- client/src/components/GalaxyWizard.vue | 25 ++++++++++++++++--------- lib/galaxy/webapps/galaxy/api/chat.py | 5 +++-- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/client/src/components/GalaxyWizard.vue b/client/src/components/GalaxyWizard.vue index 9206db372506..65ec5d0c0308 100644 --- a/client/src/components/GalaxyWizard.vue +++ b/client/src/components/GalaxyWizard.vue @@ -58,14 +58,8 @@ function submitQuery() { style="width: 100%" placeholder="What's the difference in fasta and fastq files?" @keyup.enter="submitQuery" /> - - - Let our Help Wizard Figure it out! - + + Let our Help Wizard Figure it out! @@ -76,7 +70,16 @@ function submitQuery() { -
{{ queryResponse }}
+ @@ -84,4 +87,8 @@ function submitQuery() { .chatResponse { white-space: pre-wrap; } +.disclaimer { + font-size: 0.8em; + color: #666; +} diff --git a/lib/galaxy/webapps/galaxy/api/chat.py b/lib/galaxy/webapps/galaxy/api/chat.py index 884a15d7cb3f..817b88962510 100644 --- a/lib/galaxy/webapps/galaxy/api/chat.py +++ b/lib/galaxy/webapps/galaxy/api/chat.py @@ -25,7 +25,7 @@ PROMPT = """ You are a juestion answering agent, expert on the Galaxy analysis platform and in the fields of computer science, bioinformatics, and genomics. -You will try to answer questions about Galaxy, and if you don't know the answer, you will ask the user to rephrase the question. +You will try to answer questions about Galaxy, and if you don't know the answer you will state that. """ @@ -49,9 +49,10 @@ def query(self, query: ChatPayload, trans: ProvidesUserContext = DependsOnTrans) ] if query.context == "tool_error": - msg = "The user will provide you a Galaxy tool error, and you will try to explain the error and provide a solution." + msg = "The user will provide you a Galaxy tool error, and you will try to explain the error and provide a very concise solution. No more than a paragraph." messages.append({"role": "system", "content": msg}) + completion = client.chat.completions.create( model="gpt-4o", messages=messages,