integrate Open AI to my project
5 สิ่งเกี่ยวกับ Open AI API
1. Access- platform.openai.com
2. Pricing , คิดตามจำนวน token , input and output
3. Playground
4. Authentication , 1 model ได้ 1 key เพราะฉะนั้นเมื่อได้ key แล้ว ให้ copy เก็บไว้ด้วย
ต้องดูดีๆเวลาเอาไปใช้งานเช่น ถ้าใช้ web base , มันจะอยู่ใน header ตอน request ซึ่งจะไม่secure , ต้องระวังตอน store API key ใน application
– ใน web base ถ้าเราใส่ key ใน code , จะทำให้ทุกคน visible , เพราะฉะนั้น ต้องทำใน back end
5. Code integration , Open AI เป็น standard RESTful API ซึ่ง act on HTTP request
– Open API มี 2 libraries
1. python
2. Node.js ,Typescript
