dstampfli commited on
Commit
59462c1
1 Parent(s): 0a37ce7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -22,10 +22,12 @@ chain = create_chain_openai("gpt-4o-mini", prompt, retriever)
22
 
23
  @cl.on_chat_start
24
  async def main():
 
25
  cl.user_session.set("midterm_chain", chain)
26
 
27
  @cl.on_message
28
  async def handle_message(message: cl.Message):
 
29
  chain = cl.user_session.get("midterm_chain")
30
  res = chain.invoke({"question": message.content})
31
  await cl.Message(content=res["response"]).send()
 
22
 
23
  @cl.on_chat_start
24
  async def main():
25
+ print("main")
26
  cl.user_session.set("midterm_chain", chain)
27
 
28
  @cl.on_message
29
  async def handle_message(message: cl.Message):
30
+ print("handle_message")
31
  chain = cl.user_session.get("midterm_chain")
32
  res = chain.invoke({"question": message.content})
33
  await cl.Message(content=res["response"]).send()