Closed maciej-cz closed 5 months ago
I am thinking
CompletionModel
can be renamed toOpenAIModel
and then all models can be put there and used by the different builders in future PRs. This way there would be no need to maintain several classes and would keep the library easier to maintain and to reason about
My intention was to only allow suitable models per endpoint (e.g. to not be able to use dall-e model for completion). But this approach has the maintenance overhead drawback you mentioned.
I'll apply your suggestions (hopefully today) and propagate OpenAIModel
to other places.
Thanks for the fix. The failing tests are because pull request builds don't get access to secrets. Will merge this one and figure out how to do this for any future PRs.
Fixed it in https://github.com/StefanBratanov/jvm-openai/commit/fe3239249f83dfa2c06f21304fb593c55304fbed. Future PRs should be able to have green builds and don't run the integration tests. Thanks again for this change. Will include it in the next release. Just need to finish off the Assistants streaming functionality first.
First of all, thanks for your effort of creating this project @StefanBratanov . It makes OpenAI usage much more convenient.
Now, to the point, the purpose of this change is to replace completion model parameter (currently
String
) with a value object with predefined values available.I created 2 versions of this change (the other one is #4). This one is a bit narrower:
CompletionModel
is an enumString
is still a valid model parameterPlease suggest, which version you prefer (if any).
In case of positive feedback, I can spread this change to other APIs' models.