• การจัดทำเอกสาร

    • สถานการณ์ที่ขอให้ ChatGPT “เขียนเอกสารสอนการใช้งานสำหรับผู้เริ่มต้นด้าน DevOps”
    • ใช้พรอมป์ต์ “write a detailed tutorial for DevOps beginners” และกำหนดรูปแบบไฟล์ผลลัพธ์เป็น “markdown” พร้อมตั้งชื่อไฟล์ที่จะบันทึกเป็น “tutorial.md”
    • คำสั่ง CLI: python3 code_genetate.py --prompt "write a detailed tutorial for devops beginners" --format "markdown" --file_name "tutorial.md"
    • ผลลัพธ์คือมีการสร้างไฟล์ tutorial.md
  • การแปลแบบเรียลไทม์

    • แปลไฟล์ tutorial.md ที่สร้างไว้ด้านบนเป็นภาษาเกาหลี และสร้างไฟล์ tutorial-kr.md สำหรับภาษาเกาหลี
    • คำสั่ง CLI: python3 file_process.py --input tutorial.md --output tutorial-kr.md --prompt "translate the above file into Korean"
    • ผลลัพธ์คือมีการสร้างไฟล์ tutorial-kr.md
  • การสร้างโค้ด

    • สร้างโค้ด Ansible จากเนื้อหาข้างต้น
    • คำสั่ง CLI: python3 write_with_chatgpt.py --prompt "having public and private subnet, attach internet gateway and nat gateway to the subnets also launch an instance inside the public subnet" --format "ansible" --file_name "ansible.yaml"
    • ผลลัพธ์คือมีการสร้างไฟล์ ansible.yaml
  • การตรวจทานและทำความเข้าใจโค้ด

    • ทำความเข้าใจโค้ด Ansible ที่สร้างไว้ด้านบนด้วยความช่วยเหลือจาก ChatGPT
    • คำสั่ง CLI: python3 file_process.py --input ansible.yaml --output report.txt --prompt "explain the above code in detail"
    • ผลลัพธ์คือมีการสร้างไฟล์ report.txt
  • การตรวจจับและแก้ไขข้อผิดพลาด

    • ใช้คำถามอย่าง “ถ้าในโค้ดด้านบนมี secret key ที่ฮาร์ดโค้ดไว้ ช่วยบอกฉันหน่อย” เพื่อค้นหาและแก้ไขข้อผิดพลาด
  • การพิสูจน์แนวคิด (PoC)

    • ใช้คำถามอย่าง “ฉันต้องการดีพลอยแอปพลิเคชัน node.js ที่มีผู้ใช้เฉลี่ยวันละ 10000 คน ควรเลือก instance type แบบไหนบน AWS?” เพื่อกำหนดทิศทาง PoC และรับข้อเสนอแนะ
  • การรีแฟกเตอร์

    • รับข้อเสนอแนะในการรีแฟกเตอร์โค้ดด้วยคำถามอย่าง “ช่วยรีแฟกเตอร์โค้ดที่เขียนไว้ให้หน่อย”

ยังไม่มีความคิดเห็น

ยังไม่มีความคิดเห็น