Initial commit

This commit is contained in:
PeterGriffinJin
2025-02-28 15:16:19 +00:00
commit 068516be64
207 changed files with 33063 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import requests
# URL for your local FastAPI server
url = "http://127.0.0.1:8000/retrieve"
# Example payload
payload = {
"queries": ["What is the capital of France?", "Explain neural networks."] * 200,
"topk": 5,
"return_scores": True
}
# Send POST request
response = requests.post(url, json=payload)
# Raise an exception if the request failed
response.raise_for_status()
# Get the JSON response
retrieved_data = response.json()
print("Response from server:")
print(retrieved_data)