Skip to content

Commit

Permalink
fix mypy type check
Browse files Browse the repository at this point in the history
  • Loading branch information
statefb committed Apr 12, 2024
1 parent a61a4b1 commit 4a1b67d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions backend/app/usecases/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ def insert_knowledge(
if len(search_results) == 0:
return conversation

instruction_prompt = conversation.message_map["instruction"].content[0].body
# Currently, we not use instruction prompt when inserting knowledge.
# If needed, must be verified by putting the instruction prompt in the following `inserted_prompt`.
# instruction_prompt = conversation.message_map["instruction"].content[0].body

context_prompt = ""
for result in search_results:
Expand Down Expand Up @@ -221,7 +223,7 @@ def insert_knowledge(
first answer [^1][^5]. second answer [^2][^3][^4]. third answer [^4].
</example>
""".format(
context_prompt, instruction_prompt
context_prompt
)
logger.info(f"Inserted prompt: {inserted_prompt}")

Expand Down

0 comments on commit 4a1b67d

Please sign in to comment.