Skip to content

Commit f307fb0

Browse files
author
sd109
committed
Rename config options for clarity
1 parent 5ab0b79 commit f307fb0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

web-app/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
def inference(message, history):
1414
context = ""
1515
for user_input, system_response in history:
16-
if settings.include_user_messages_in_context:
16+
if settings.include_past_system_responses_in_context:
1717
context += settings.user_context_template.format(user_input=user_input)
18-
if settings.include_system_responses_in_context:
18+
if settings.include_past_system_responses_in_context:
1919
context += settings.system_context_template.format(
2020
system_response=system_response
2121
)

web-app/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ class AppSettings(BaseSettings):
3333
description="The template to use for requests to the backend model. If present, the '\{context\}' placeholder will be replaced by the conversation history of the current session. In order for the frontend to correctly filter out context from the displayed text, the context placeholder must not appear on the final line of the prompt template.",
3434
)
3535
# The following settings are only used if {context} used in prompt template
36-
include_user_messages_in_context: bool = True
37-
include_system_responses_in_context: bool = True
36+
include_past_user_messages_in_context: bool = True
37+
include_past_system_responses_in_context: bool = True
3838
user_context_template: str = Field(
3939
default="<<USER>>\n{user_input}\n<</USER>>\n",
4040
description="The template string to use for including user messages in the prompt context sent to backend. The '\{user_input\}' placeholder will be replaced by the the user's messages. (Only applies if '\{context\}' is present in prompt_template)",

0 commit comments

Comments
 (0)