Spaces:
Runtime error
Runtime error
Update appDeepseekCoder.py
Browse files- appDeepseekCoder.py +4 -0
appDeepseekCoder.py
CHANGED
|
@@ -24,6 +24,10 @@ async def startup_event():
|
|
| 24 |
print("llm initialized!")
|
| 25 |
conversation_memory = ConversationBufferMemory(memory_key="chat_history", max_len=50, return_messages=True)
|
| 26 |
llm_chain = LLMChain(llm=llm, prompt=maths_assistant_prompt_template, memory=conversation_memory)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
cl.user_session.set("llm_chain", llm_chain)
|
| 28 |
|
| 29 |
@app.post("/query/")
|
|
|
|
| 24 |
print("llm initialized!")
|
| 25 |
conversation_memory = ConversationBufferMemory(memory_key="chat_history", max_len=50, return_messages=True)
|
| 26 |
llm_chain = LLMChain(llm=llm, prompt=maths_assistant_prompt_template, memory=conversation_memory)
|
| 27 |
+
|
| 28 |
+
# Initialize Chainlit context
|
| 29 |
+
cl.init()
|
| 30 |
+
|
| 31 |
cl.user_session.set("llm_chain", llm_chain)
|
| 32 |
|
| 33 |
@app.post("/query/")
|