Spaces:
Build error
Build error
bentebbutt
commited on
Commit
•
07bdcb4
1
Parent(s):
7631800
Update backend/app.py
Browse files- backend/app.py +12 -1
backend/app.py
CHANGED
@@ -14,6 +14,11 @@ async def custom_auth():
|
|
14 |
|
15 |
|
16 |
|
|
|
|
|
|
|
|
|
|
|
17 |
import langroid as lr
|
18 |
import langroid.language_models as lm
|
19 |
import chainlit as cl
|
@@ -21,7 +26,13 @@ import chainlit as cl
|
|
21 |
|
22 |
@cl.on_chat_start
|
23 |
async def on_chat_start():
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
agent = lr.ChatAgent(lr.ChatAgentConfig(llm=lm_config))
|
26 |
task = lr.Task(agent, interactive=True)
|
27 |
|
|
|
14 |
|
15 |
|
16 |
|
17 |
+
import langroid as lr
|
18 |
+
import langroid.language_models as lm
|
19 |
+
import chainlit as cl
|
20 |
+
|
21 |
+
|
22 |
import langroid as lr
|
23 |
import langroid.language_models as lm
|
24 |
import chainlit as cl
|
|
|
26 |
|
27 |
@cl.on_chat_start
|
28 |
async def on_chat_start():
|
29 |
+
lm_config = lm.OpenAIGPTConfig(
|
30 |
+
chat_model=model or lm.OpenAIChatModel.GPT4_TURBO,
|
31 |
+
chat_context_length=8_000,
|
32 |
+
temperature=0,
|
33 |
+
max_output_tokens=200,
|
34 |
+
timeout=45,
|
35 |
+
)
|
36 |
agent = lr.ChatAgent(lr.ChatAgentConfig(llm=lm_config))
|
37 |
task = lr.Task(agent, interactive=True)
|
38 |
|