| 4744 | if (!json_string(p, &key)) goto item_fail; |
| 4745 | json_ws(p); |
| 4746 | if (**p != ':') { |
| 4747 | free(key); |
| 4748 | goto item_fail; |
| 4749 | } |
| 4750 | (*p)++; |
| 4751 | if (!strcmp(key, "type")) { |
| 4752 | if (!json_string_replace(p, &type)) { |
| 4753 | free(key); |
| 4754 | goto item_fail; |
| 4755 | } |
| 4756 | } else if (!strcmp(key, "role")) { |
| 4757 | if (!json_string_replace(p, &role)) { |
| 4758 | free(key); |
| 4759 | goto item_fail; |
| 4760 | } |
| 4761 | } else if (!strcmp(key, "content")) { |
| 4762 | if (!parse_responses_content_array_multimodal( |
| 4763 | p, &content, &content_images)) { |
| 4764 | free(key); |
| 4765 | goto item_fail; |
| 4766 | } |
| 4767 | } else if (!strcmp(key, "name")) { |