Mũi TTPusa

Mũi khoan của hãng TTPusa gồm nhiều loại : Mũi khoan bê tông, mũi khoan sắt inox và mũi khoan sắt thép.

Mũi Khoét Gỗ 7 Đầu TTPusa

Mũi Taro TTPusa

Mũi Phay Đào TTPusa Alu SD

Mũi Phay Chữ V Alu SD TTPusa

Mũi Phay Thẳng Alu SD TTPusa

Mũi Phay Alu Đào UD TTPusa

Mũi Phay V Alu UD TTPusa

Mũi Phay Thẳng Alu UD TTPusa

Trang:

Logo thương hiệu

Đăng ký nhận tin

Nhận thông tin sản phẩm mới nhất, tin khuyến mãi và nhiều hơn nữa.

Lên đầu trang
Chat AI
Chat Live
```js import express from 'express'; import cors from 'cors'; import bodyParser from 'body-parser'; import { Configuration, OpenAIApi } from 'openai'; const app = express(); app.use(cors()); app.use(bodyParser.json()); app.use(express.static('public')); // serve chat-widget.html and assets const configuration = new Configuration({ apiKey: process.env.OPENAI_API_KEY, }); const openai = new OpenAIApi(configuration); app.post('/api/chat', async (req, res) => { try { const userMessage = req.body.message; const completion = await openai.createChatCompletion({ model: 'gpt-3.5-turbo', messages: [ {role: 'system', content: 'You are a helpful assistant.'}, {role: 'user', content: userMessage} ], }); const reply = completion.data.choices[0].message.content; res.json({reply}); } catch (error) { console.error(error); res.status(500).json({reply: 'Đã có lỗi xảy ra.'}); } }); const PORT = process.env.PORT || 3000; app.listen(PORT, () => console.log(`Server chạy tại http://localhost:${PORT}`));