feat: add xAI handling and response processing
This commit is contained in:
@@ -56,6 +56,9 @@ func StringData(c *gin.Context, str string) error {
|
||||
}
|
||||
|
||||
func ObjectData(c *gin.Context, object interface{}) error {
|
||||
if object == nil {
|
||||
return errors.New("object is nil")
|
||||
}
|
||||
jsonData, err := json.Marshal(object)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error marshalling object: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user