ApoAlly API#
Przykłady kodu#
Python z Requests#
```python import requests
api_url = “https://api.apoally.de/api/chat/completions” headers = { “Authorization”: “Bearer YOUR_API_KEY”, “Content-Type”: “application/json” } data = { “model”: “apoally”, “messages”: [ {“role”: “user”, “content”: “Proszę podaj mi najnowsze informacje na temat reformy szpitali.”} ], “temperature”: 0.7 }
response = requests.post(api_url, headers=headers, json=data) print(response.json()[“choices”][0][“message”][“content”])