Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ParisNeo authored Nov 30, 2023
1 parent a6720dd commit 96e5cc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lollms/apps/discord_bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ def prepare_query(discussion, prompt, n_tokens: int = 0) -> Tuple[str, str, List

# Check if there is discussion history to add to the prompt
history = ""
if lollms_app.config.use_discussions_history and lollms_app.discussions_store is not None:
if lollms_app.config.use_discussions_history and lollms_app.long_term_memory is not None:
if history=="":
documentation="!@>History:\n"
docs, sorted_similarities = lollms_app.discussions_store.recover_text(current_message.content, top_k=lollms_app.config.data_vectorization_nb_chunks)
docs, sorted_similarities = lollms_app.long_term_memory.recover_text(current_message.content, top_k=lollms_app.config.data_vectorization_nb_chunks)
for doc, infos in zip(docs, sorted_similarities):
history += f"discussion chunk:\ndiscussion title: {infos[0]}\nchunk content:{doc}"

Expand Down

0 comments on commit 96e5cc2

Please sign in to comment.