Update csvanswer.py
Browse files- csvanswer.py +2 -2
csvanswer.py
CHANGED
@@ -11,7 +11,7 @@ import chainlit as cl
|
|
11 |
|
12 |
from deep_translator import GoogleTranslator
|
13 |
|
14 |
-
def create_agent(filename: str):
|
15 |
"""
|
16 |
Create an agent that can access and use a large language model (LLM).
|
17 |
|
@@ -34,7 +34,7 @@ def create_agent(filename: str):
|
|
34 |
|
35 |
|
36 |
async def LLMAnswer(msg):
|
37 |
-
agent = create_agent("./public/surveyia.csv")
|
38 |
cb = cl.AsyncLangchainCallbackHandler()
|
39 |
try:
|
40 |
res = await agent.acall("Réponds en langue française à la question suivante : " + msg, callbacks=[cb])
|
|
|
11 |
|
12 |
from deep_translator import GoogleTranslator
|
13 |
|
14 |
+
async def create_agent(filename: str):
|
15 |
"""
|
16 |
Create an agent that can access and use a large language model (LLM).
|
17 |
|
|
|
34 |
|
35 |
|
36 |
async def LLMAnswer(msg):
|
37 |
+
agent = await create_agent("./public/surveyia.csv")
|
38 |
cb = cl.AsyncLangchainCallbackHandler()
|
39 |
try:
|
40 |
res = await agent.acall("Réponds en langue française à la question suivante : " + msg, callbacks=[cb])
|