mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-28 12:35:08 +02:00
doc updates (#1639)
--------- Co-authored-by: vbarda <vadym@langchain.dev>
This commit is contained in:
co-authored by
vbarda
parent
38a644cf79
commit
db306cd01b
@@ -14,7 +14,11 @@ The following endpoints accept `webhook` as a parameter:
|
||||
- Stream Run Stateless -> POST /runs/stream
|
||||
- Wait Run Stateless -> POST /runs/wait
|
||||
|
||||
In this example, we will show calling a webhook after streaming a run. First, let's setup our assistant and thread:
|
||||
In this example, we will show calling a webhook after streaming a run.
|
||||
|
||||
## Setup
|
||||
|
||||
First, let's setup our assistant and thread:
|
||||
|
||||
=== "Python"
|
||||
|
||||
@@ -70,13 +74,15 @@ Output:
|
||||
'values': None
|
||||
}
|
||||
|
||||
## Use graph with a webhook
|
||||
|
||||
Now we can invoke a run with a webhook:
|
||||
|
||||
=== "Python"
|
||||
|
||||
```python
|
||||
# create input
|
||||
input = { "messages": [{ "role": "human", "content": "Hello!" }] }
|
||||
input = { "messages": [{ "role": "user", "content": "Hello!" }] }
|
||||
|
||||
async for chunk in client.runs.stream(
|
||||
thread_id=thread["thread_id"],
|
||||
|
||||
Reference in New Issue
Block a user