Skip to content

Commit e69e74a

Browse files
fixes
1 parent d00ed40 commit e69e74a

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

services/docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ services:
877877
WEBSERVER_PORT: ${WB_API_WEBSERVER_PORT}
878878
WEBSERVER_RPC_NAMESPACE: ${WB_API_WEBSERVER_HOST}
879879
WEBSERVER_STATICWEB: "null"
880-
WEBSERVER_CONVERSATIONS: "null" # override *webserver_environment
880+
WEBSERVER_CONVERSATIONS: "false" # override *webserver_environment
881881
WEBSERVER_CHATBOT: "null" # override *webserver_environment
882882
WEBSERVER_FOGBUGZ: "null" # override *webserver_environment
883883

@@ -922,7 +922,7 @@ services:
922922
WEBSERVER_ANNOUNCEMENTS: ${WB_DB_EL_ANNOUNCEMENTS}
923923
WEBSERVER_CATALOG: ${WB_DB_EL_CATALOG}
924924
WEBSERVER_CHATBOT: "null"
925-
WEBSERVER_CONVERSATIONS: "null"
925+
WEBSERVER_CONVERSATIONS: "false"
926926
WEBSERVER_CELERY: "null"
927927
WEBSERVER_DB_LISTENER: ${WB_DB_EL_DB_LISTENER}
928928
WEBSERVER_DIAGNOSTICS: ${WB_DB_EL_DIAGNOSTICS}
@@ -1005,7 +1005,7 @@ services:
10051005
WEBSERVER_ANNOUNCEMENTS: ${WB_GC_ANNOUNCEMENTS}
10061006
WEBSERVER_CATALOG: ${WB_GC_CATALOG}
10071007
WEBSERVER_CHATBOT: "null"
1008-
WEBSERVER_CONVERSATIONS: "null"
1008+
WEBSERVER_CONVERSATIONS: "false"
10091009
WEBSERVER_CELERY: "null"
10101010
WEBSERVER_DB_LISTENER: ${WB_GC_DB_LISTENER}
10111011
WEBSERVER_DIAGNOSTICS: ${WB_GC_DIAGNOSTICS}
@@ -1082,7 +1082,7 @@ services:
10821082
WEBSERVER_ANNOUNCEMENTS: 0
10831083
WEBSERVER_CATALOG: "null"
10841084
WEBSERVER_CHATBOT: "null"
1085-
WEBSERVER_CONVERSATIONS: "null"
1085+
WEBSERVER_CONVERSATIONS: "false"
10861086
WEBSERVER_CELERY: "null"
10871087
WEBSERVER_DB_LISTENER: 0
10881088
WEBSERVER_DIRECTOR_V2: "null"

services/web/server/src/simcore_service_webserver/chatbot/_process_chatbot_trigger_service.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,16 @@ async def _process_chatbot_trigger_message(app: web.Application, data: bytes) ->
5151
order_by=OrderBy(field=IDStr("created"), direction=OrderDirection.DESC),
5252
)
5353
_question_for_chatbot = ""
54-
for msg in messages:
55-
_question_for_chatbot += f"{msg.content.strip()}\n"
54+
for inx, msg in enumerate(messages):
55+
if inx == 0:
56+
# Make last message stand out as the question
57+
_question_for_chatbot += (
58+
"User last message: \n"
59+
f"{msg.content.strip()} \n\n"
60+
"Previous messages in the conversation: \n"
61+
)
62+
else:
63+
_question_for_chatbot += f"{msg.content.strip()}\n"
5664

5765
# Talk to the chatbot service
5866
chatbot_client = get_chatbot_rest_client(app)

0 commit comments

Comments
 (0)