(v any)
| 129 | } |
| 130 | |
| 131 | func measureJSONSize(v any) int { |
| 132 | data, err := json.Marshal(v) |
| 133 | if err != nil { |
| 134 | return 0 |
| 135 | } |
| 136 | return len(data) |
| 137 | } |
| 138 | |
| 139 | // generateChatCompletionsPayload creates a JSON payload with the specified number of messages. |
| 140 | // Messages alternate between user and assistant roles to simulate a conversation. |
no test coverage detected