hawk9821 opened a new issue, #7617:
URL: https://github.com/apache/seatunnel/issues/7617

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   
![20240910084357](https://github.com/user-attachments/assets/db5c0780-7527-41bb-b14f-96f05c1c2c97)
   
   
   ### SeaTunnel Version
   
   2.3.8-SNAPSHOT
   
   ### SeaTunnel Config
   
   ```conf
   env {
     parallelism = 1
     job.mode = "BATCH"
   }
   
   source {
     FakeSource {
       row.num = 5
       schema = {
         fields {
           id = "int"
           name = "string"
         }
       }
       rows = [
         {fields = [1, "Jia Fan"], kind = INSERT}
         {fields = [2, "Hailin Wang"], kind = INSERT}
         {fields = [3, "Tomas"], kind = INSERT}
         {fields = [4, "Eric"], kind = INSERT}
         {fields = [5, "Guangdong Liu"], kind = INSERT}
       ]
     }
   }
   
   transform {
     LLM {
       model_provider = OPENAI
       model = gpt-4o-mini
       api_key = sk-xxx
       prompt = "Determine whether someone is Chinese or American by their name"
       output_data_type = boolean
     }
   }
   
   sink {
     console {
     }
   }
   ```
   
   
   ### Running Command
   
   ```shell
   seatunnel.sh --config xxx.conf
   ```
   
   
   ### Error Exception
   
   ```log
   `Caused by: 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.JsonMappingException: 
Unrecognized token 'True': was expecting (JSON String, Number, Array, Object or 
token 'null', 'true' or 'false')
    at [Source: (String)"[True]"; line: 1, column: 6] (through reference chain: 
java.util.ArrayList[0])
        at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:392)
        at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:363)
        at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.deser.std.StringCollectionDeserializer.deserialize(StringCollectionDeserializer.java:221)
        at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.deser.std.StringCollectionDeserializer.deserialize(StringCollectionDeserializer.java:182)
        at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.deser.std.StringCollectionDeserializer.deserialize(StringCollectionDeserializer.java:25)
        at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
        at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4674)
        at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3629)
        at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3612)
        at 
org.apache.seatunnel.transform.nlpmodel.llm.remote.kimiai.KimiAIModel.chatWithModel(KimiAIModel.java:93)
        at 
org.apache.seatunnel.transform.nlpmodel.llm.remote.AbstractModel.inference(AbstractModel.java:64)
        at 
org.apache.seatunnel.transform.nlpmodel.llm.LLMTransform.getOutputFieldValue(LLMTransform.java:126)
        ... 21 more`
   ```
   
   
   ### Zeta or Flink or Spark Version
   
   zeta
   
   ### Java or Scala Version
   
   1.8
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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]

Reply via email to