Spaces:
Running
Running
Commit
·
141c4ac
1
Parent(s):
da67151
Fix respond function parameters
Browse files
app.py
CHANGED
@@ -8,7 +8,10 @@ LANGGRAPH_DEPLOYMENT = "https://chambre-agricole-chatbot-686407044d7f59d29a1e494
|
|
8 |
client = get_client(url=LANGGRAPH_DEPLOYMENT)
|
9 |
|
10 |
async def respond(
|
11 |
-
message,
|
|
|
|
|
|
|
12 |
):
|
13 |
thread = await client.threads.create()
|
14 |
|
@@ -26,7 +29,7 @@ async def respond(
|
|
26 |
|
27 |
async for chunk in client.runs.stream(
|
28 |
thread_id=thread.id,
|
29 |
-
assistant_id=assistants[0]
|
30 |
input={},
|
31 |
stream_mode="events",
|
32 |
):
|
|
|
8 |
client = get_client(url=LANGGRAPH_DEPLOYMENT)
|
9 |
|
10 |
async def respond(
|
11 |
+
message: str,
|
12 |
+
*,
|
13 |
+
history: list[tuple[str, str]] = None,
|
14 |
+
system_message: str = "You are a friendly Chatbot.",
|
15 |
):
|
16 |
thread = await client.threads.create()
|
17 |
|
|
|
29 |
|
30 |
async for chunk in client.runs.stream(
|
31 |
thread_id=thread.id,
|
32 |
+
assistant_id=assistants[0]["assistant_id"],
|
33 |
input={},
|
34 |
stream_mode="events",
|
35 |
):
|