Hisoka-X commented on code in PR #8551:
URL: https://github.com/apache/seatunnel/pull/8551#discussion_r1944164440
##########
seatunnel-transforms-v2/src/test/java/org/apache/seatunnel/transform/llm/LLMRequestJsonTest.java:
##########
@@ -209,4 +208,50 @@ void testCustomRequestJson() throws IOException {
"{\"messages\":[{\"role\":\"system\",\"content\":\"Determine
whether someone is Chinese or American by their
name\"},{\"role\":\"user\",\"content\":\"{\\\"id\\\":1,
\\\"name\\\":\\\"John\\\"}\"}],\"model\":\"custom-model\"}",
OBJECT_MAPPER.writeValueAsString(node));
}
+
+ @Test
+ void testCustomOllamaRequestJson() throws IOException {
Review Comment:
The test case can not reach the new code. I think you can use `Mockito` to
[set http
response](https://github.com/apache/seatunnel/pull/8551/files#diff-5cb1c07d7e029bd5547f51c1de022f53569c993806c5e08b426676cc930e0298R91)
then parse it by the code you added. Please refer
https://github.com/apache/seatunnel/blob/99fa19d2eab95b68dd79e27866233bd950efb166/seatunnel-engine/seatunnel-engine-core/src/test/java/org/apache/seatunnel/engine/core/classloader/ClassLoaderServiceTest.java#L117
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]