feat: add xAI handling and response processing

This commit is contained in:
CaIon committed 2025-04-10 17:20:59 +08:00
1 parent b40bf7c812
commit 60a9bd45c6
6 files changed
+137 -9

No files matched your search

+4
View File
@@ -12,3 +12,7 @@ func DecodeJson(data []byte, v any) error {
func DecodeJsonStr(data string, v any) error {
return DecodeJson(StringToByteSlice(data), v)
}
func EncodeJson(v any) ([]byte, error) {
return json.Marshal(v)
}