Spaces:
Build error
Build error
Update backend/app.py
Browse files- backend/app.py +10 -1
backend/app.py
CHANGED
@@ -23,7 +23,16 @@ import chainlit as cl
|
|
23 |
|
24 |
@cl.on_chat_start
|
25 |
async def on_chat_start():
|
26 |
-
lm_config = lm.OpenAIGPTConfig(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
agent = lr.ChatAgent(lr.ChatAgentConfig(llm=lm_config))
|
28 |
task = lr.Task(agent, interactive=True)
|
29 |
|
|
|
23 |
|
24 |
@cl.on_chat_start
|
25 |
async def on_chat_start():
|
26 |
+
lm_config = lm.OpenAIGPTConfig(
|
27 |
+
chat_model=models['phi3'],
|
28 |
+
chat_context_length=4000, # set this based on model
|
29 |
+
max_output_tokens=4096,
|
30 |
+
temperature=0.2,
|
31 |
+
stream=True,
|
32 |
+
timeout=45,
|
33 |
+
)
|
34 |
+
|
35 |
+
|
36 |
agent = lr.ChatAgent(lr.ChatAgentConfig(llm=lm_config))
|
37 |
task = lr.Task(agent, interactive=True)
|
38 |
|