Skip to content

Commit

Permalink
Support streaming APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
yangwenz08 committed Jul 5, 2024
1 parent 74c9c8e commit 1256b8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/streaming/test_agent.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import requests

url = "http://localhost:8000/v1/generate"
url = "http://localhost:8001/v1/generate"
data = {
"model_name": "streaming",
"inputs": {"repeat": 5}
}
with requests.post(url, stream=True, json=data) as r:
with requests.post(url, stream=True, json=data, headers={"UID": "12345"}) as r:
for chunk in r.iter_lines():
print(chunk)

0 comments on commit 1256b8c

Please sign in to comment.