問題
最近使用 Azure AI 中的 Assistant API 時,當它使用到了Function Call時,它傳入的參數值居然變成了亂碼!!!
似乎本來是 UTF-8 結果被轉成了 Latin-1 編碼。
解法
後來找到Assistant API Stream in gpt-4o (2024-11-20) mis-encodes function call arguments,
原來是因為使用到了最新版本的GPT-4o的版本(2024-11-20
)。
將部署的模型將版本改到前一版本(2024-08-06
),就不會有亂碼的狀況了。
參考資源
Assistant API Stream in gpt-4o (2024-11-20) mis-encodes function call arguments