import so'rovlari # API endpoint url = "https://api.example.com/endpoint" # GET so'rov javobini yuborish = requests.get(url) # So'rov muvaffaqiyatli bo'lganligini tekshiring response.status_code == 200: # API ma'lumotlarini bosib chiqarish print(response.json()) else: # Xato xabarini bosib chiqarish print("Error:", response.status_code) Ushbu misolda, GET so'rovini API endpointga yuborish uchun requests.get() funksiyasi ishlatiladi. Javob o'zgaruvchisi API javobini o'z ichiga oladi, uni response.json() usuli yordamida tahlil qilish mumkin. So'rov muvaffaqiyatli bo'lganligini tekshirish uchun response.status_code xususiyatidan foydalanish mumkin (status kod 200 muvaffaqiyatni ko'rsat
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence