cequence-io / openai-scala-client

Scala client for OpenAI API
MIT License
191 stars 20 forks source link

pass coreUrl as configuration parameter #41

Closed cric96 closed 1 year ago

cric96 commented 1 year ago

There are open source services (such as vicuna) that are based on the API of open ai. It would be interesting to continue using this library in these cases as well. It seems to me that there is only to add as an additional configuration value the coreUrl defined in OpenAIServiceConsts, the rest should be the same. If you can confirm that you might be interested in this use case as well, I can do a PR on the day :) Thank you very much for the work done in the meantime!

peterbanda commented 1 year ago

You can test it out as:

val service = OpenAICoreServiceFactory("http://localhost:8000/v1/")

Note that it's an experimental feature (supporting also Azure) so there could be a few bumps.