const chatContainer = document.getElementById('chat-container'); async function chat() { const response = await fetch('https://api.openai.com/v1/engine/davinci-codex/completions', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer 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', }, body: JSON.stringify({ prompt: 'Ask me anything!', max_tokens: 100, n: 1, stop: '###', }) }); const { choices } = await response.json(); const message = choices[0].text.trim(); const chatBubble = document.createElement('div'); chatBubble.classList.add('chat-bubble'); chatBubble.textContent = message; chatContainer.appendChild(chatBubble); } chat();
  • Piazza Fontana, 1, Fabbriche di Vergemoli, Lucca, Itália
  • Palazzo Balduini, Piazza garibaldi 68, Barga, Lucca, Itália.

ADELANTE SOCIETÀ COOPERATIVA SOCIALE