Mdean77 commited on
Commit
b29e219
·
1 Parent(s): b85295e

Renamed authjors

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -139,14 +139,17 @@ async def on_chat_start():
139
  | chat_prompt | chat_model
140
  )
141
  msg.content = f"Processing `{file.name}` done. You can now ask questions!"
142
- await msg.update()
143
 
144
  cl.user_session.set("chain", retrieval_augmented_qa_chain)
145
 
146
  # ### Rename Chains ###
147
- # @cl.author_rename
148
- # def rename(orig_author: str):
149
- # """ RENAME CODE HERE """
 
 
 
150
 
151
  ### On Message Section ###
152
  @cl.on_message
 
139
  | chat_prompt | chat_model
140
  )
141
  msg.content = f"Processing `{file.name}` done. You can now ask questions!"
142
+ await msg.send()
143
 
144
  cl.user_session.set("chain", retrieval_augmented_qa_chain)
145
 
146
  # ### Rename Chains ###
147
+ @cl.author_rename
148
+ def rename(orig_author: str):
149
+ """ RENAME CODE HERE """
150
+ rename_dict = {"ChatOpenAI": "the Generator ...", "VectorStoreRetriever" : "the Retriever"}
151
+ return rename_dict.get(orig_author, orig_author)
152
+
153
 
154
  ### On Message Section ###
155
  @cl.on_message