api-space / test_local.py
fpadron's picture
initial commit
741f393
raw
history blame
345 Bytes
import requests
import json
url = "http://127.0.0.1:8000/ask_localai"
payload = json.dumps({
"query": "Is there a case number for OWASP?"
})
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print("-------------------")
print(response)