YAHyA7
Joined Oct 2026Last seen 1h ago
120—
// Exemple d'envoi de données JSON vers l'API HashMap<String, Object> map = new HashMap<>(); map.put("model", "gpt-3.5-turbo"); // ou autre modèle // En-têtes pour l'authentification HashMap<String, String> headers = new HashMap<>(); headers.put("Content-Type", "application/json"); headers.put("Authorization", "Bearer VOTRE_CLE_API_ICI"); net.setHeaders(headers); net.setParams(map, RequestNetwork.REQUEST_BODY); net.startRequestNetwork(RequestNetwork.POST, "https://api.openai.com/v1/chat