gateway/test.py
2025-03-08 22:59:20 +01:00

15 lines
485 B
Python

import requests
def test_gateway(prompttext):
url = 'http://localhost:7000/gpt'
payload = {
'prompt': prompttext,
}
response = requests.post(url, json=payload)
if response.status_code == 200:
print('Response from GPT:', response.json()['response'])
else:
print('Failed to get response:', response.status_code, response.text)
test_gateway("Please give me a python script to summarize all cells in an excel sheet")
print("finished")