GithubHelp home page GithubHelp logo

Comments (11)

StefanBratanov avatar StefanBratanov commented on July 21, 2024 1

Thank you. Brings an interesting point because the Jackson scope in this library is implementation and not api so it is not classified as transitive dependency by Gradle and thus lower version of Jackson could be used. I may change this to api in next release to avoid this.

from jvm-openai.

StefanBratanov avatar StefanBratanov commented on July 21, 2024

Hi, which version of the library do you use? I added a test to deserialize this json as part of 2308414 and it works.

from jvm-openai.

hntan avatar hntan commented on July 21, 2024

Hi, which version of the library do you use? I added a test to deserialize this json as part of 2308414 and it works.

My application uses Jackson version 2.15.2

from jvm-openai.

StefanBratanov avatar StefanBratanov commented on July 21, 2024

I tried downgrading to this version and it still works. Are you trying to deserialize it using your own ObjectMapper or just getting this error when using the library?

from jvm-openai.

hntan avatar hntan commented on July 21, 2024

I tried downgrading to this version and it still works. Are you trying to deserialize it using your own ObjectMapper or just getting this error when using the library?

No, I'm not trying to use other custom ObjectMapper, I use the library directly in my application and got the error, it's kind of strange. (Of course our application has a custom ObjectMapper instance but the OpenAIClient uses it owns instance in ObjectMapperSingleton which uses PropertyNamingStrategies.SNAKE_CASE)

Screenshot 2024-03-28 at 18 00 02

from jvm-openai.

StefanBratanov avatar StefanBratanov commented on July 21, 2024

Hmm yes, it is strange. I can't seem to be able to reproduce with the json that you provided. Just to confirm which Java version and OS do you use?

from jvm-openai.

hntan avatar hntan commented on July 21, 2024

Hmm yes, it is strange. I can't seem to be able to reproduce with the json that you provided. Just to confirm which Java version and OS do you use?

Hi @StefanBratanov , My spring boot application uses java 17 and I use MacOs

from jvm-openai.

StefanBratanov avatar StefanBratanov commented on July 21, 2024

Thank you. Will look into it and update here.

from jvm-openai.

hntan avatar hntan commented on July 21, 2024

Hi @StefanBratanov , thanks for your assistance! I suspect the issue stems from conflicting Jackson library versions in my project. It's possible that version 2.15.2 isn't being used, and 2.13.3 is interfering. I rely on several other com.fasterxml.jackson.* libraries, so I'll investigate this further.

from jvm-openai.

StefanBratanov avatar StefanBratanov commented on July 21, 2024

Hi @hntan, I have decided to keep the implementation scope, since Jackson is only used internally and I wouldn't want the dependency to be transitively exposed to consumers in case they don't use Jackson. It is a trade-off essentially. Feel free to reopen the issue if you still have issues and I can think about a solution.

from jvm-openai.

StefanBratanov avatar StefanBratanov commented on July 21, 2024

Hi @hntan as part of https://github.com/StefanBratanov/jvm-openai/releases/tag/v0.9.1 release, I added a workaround which should fix your record deserialization problems if you still face them.

from jvm-openai.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.