Comments (11)
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.
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.
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.
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.
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)
from jvm-openai.
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.
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.
Thank you. Will look into it and update here.
from jvm-openai.
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.
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.
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)
- ChatMessage.systemMessage or Any Other ChatMessage.*Message HOT 3
- HttpRequest Timeout HOT 3
- Ability to call self hosted OpenaiCompatible endpoints HOT 5
- Function parameters are serialized with JSON escaping, making it difficult to emit the write JSON HOT 9
- Class namings HOT 3
- ToolResources visibility HOT 2
- JSON Serialization Issue HOT 1
- using in Android project HOT 11
- streamChatCompletion: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 HOT 2
- adding some constants HOT 2
- Support for non-OpenAI Providers HOT 2
- Return Json HOT 1
- Expose the HttpResponse for requests HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jvm-openai.