-
Notifications
You must be signed in to change notification settings - Fork 160
Open
Labels
Description
Context
- The jar dependency adds around 30MB to my final spring boot project, based on the main dependency and its child dependencies.
- The decompressed
openai-java-core
takes about 76MB. - The
ResponseStreamEvent.class
is by itself 91KB. The contents of this file are more equivalent to a god function written inC
than object oriented code written inJava
. Maybe due to some sort of scripted code creation?
62M ./com/openai/models
10M ./com/openai/services
Concerns
- The first concern is the added size in terms of MB to the project size.
- The second concern is that when this code runs, it will instantiate larger than necessary objects that will consume more memory (compared to a better design).
- For instance
ResponseStreamEvent
, it has: 51 member variables, leading to very large functions such asequals
,hashcode
,toString
, and most other methods; across 2400 lines of code
- For instance
- The third concern is about forcing integrators to have to pull in Kotlin into a server side project. Additionally, when there is no intention to run on Android.
Feature Request
Please consider to:
- refactor and remove the kotlin dependency
- refactor and reduce the overall SDK size.