speech to text • Use AI to extract data from JSON • Use AI to think what to call (which API to use) • Integrate with LINE Messaging API and LINE Shopping API • We create a Rich workflow using AI
completion API • Function calling • Structured data extraction • LINE API • LINE Messaging API ส ำ หรับรับ webhook และ reply message • LINE SHOPPING API ส ำ หรับ get product และ update inventory How?
ID curl --request POST \ --url https://api.openai.com/v1/audio/transcriptions \ --header "Authorization: Bearer $OPENAI_API_KEY" \ --header 'Content-Type: multipart/form-data' \ --form file=@/path/to/file/speech.mp3 \ --form model=whisper-1 \ --form response_format=text ได้ response เ ป็ น text = `ดูสินค้าในร้าน` And we use OpenAI speech to text API
Shopping API curl https://developers-oaplus.line.biz/myshop/v1/products \ --header “X-API-KEY: Bearer $LINE_SHOPPING_API_KEY” \ --header ‘Content-Type: application/json‘ We then use normal LINE Messaging Reply API to reply to user
to Get Message Content by Message ID to get audio Use OpenAI Speech to text to convert audio to text We get “อัพเดท inventory เ สื้ อไลน์เดฟ เ ป็ น 25 ตัว”
all products, and fi nd inventory id for us. 1. Call LINE shopping get products 2. Ask AI to fi nd inventory id by product name 3. Call LINE Shopping API update inventory by id
at structured data extraction. You will be given json response from api and should parse inventory id" }, { "role": "system", "content": "extract inventory id for เสื้อไล น์ เดฟ with following: { … // JSON … }” } ],
of products? • Maybe using vector embedding to do text search • Using assistant API to do `thread` conversation • OpenAI now have speech to speech real-time API • And more!
speech to text • Use AI to think what to call (which API to use) • Use AI to extract data from JSON • Integrate with LINE Messaging API and LINE Shopping API • We create a Rich workflow using AI