generateResponsesPayload creates a JSON payload for the responses API with the specified number of input items. Input items alternate between user and assistant roles to simulate a conversation.
(payloadSize int, inputCount int, stream bool)
| 153 | // generateResponsesPayload creates a JSON payload for the responses API with the specified number of input items. |
| 154 | // Input items alternate between user and assistant roles to simulate a conversation. |
| 155 | func generateResponsesPayload(payloadSize int, inputCount int, stream bool) []byte { |
| 156 | provider := &responsesProvider{} |
| 157 | inputs := generateConversation(provider, payloadSize, inputCount) |
| 158 | |
| 159 | body := provider.buildRequestBody(provider.DefaultModel(), inputs, stream) |
| 160 | bodyBytes, err := json.Marshal(body) |
| 161 | if err != nil { |
| 162 | panic(err) |
| 163 | } |
| 164 | return bodyBytes |
| 165 | } |
| 166 | |
| 167 | func TestOpenAI_TypeAndName(t *testing.T) { |
| 168 | t.Parallel() |
no test coverage detected