M5 AP-003 Adapter-Tests für Timeout und JSON-Request-Inhalt belastbar
gemacht
This commit is contained in:
+4
-1
@@ -277,11 +277,14 @@ public class OpenAiHttpAdapter implements AiInvocationPort {
|
||||
* The {@link AiRequestRepresentation#sentCharacterCount()} is recorded as audit metadata
|
||||
* but is <strong>not</strong> used to truncate content in the adapter. The full
|
||||
* document text is sent to the AI service.
|
||||
* <p>
|
||||
* <strong>Package-private for testing:</strong> This method is accessible to tests
|
||||
* in the same package to verify the actual JSON body structure and content.
|
||||
*
|
||||
* @param request the request with prompt and document text
|
||||
* @return JSON string ready to send in HTTP body
|
||||
*/
|
||||
private String buildJsonRequestBody(AiRequestRepresentation request) {
|
||||
String buildJsonRequestBody(AiRequestRepresentation request) {
|
||||
JSONObject body = new JSONObject();
|
||||
body.put("model", apiModel);
|
||||
body.put("temperature", 0.0);
|
||||
|
||||
Reference in New Issue
Block a user