It would be a nice-to-have to provide a mechanism to access models in a statically typed fashion rather than using the hard coded Strings.
From the onboarding example, rather than :
CompletionRequest completionRequest = CompletionRequest.builder()
.prompt("Somebody once told me the world is gonna roll me")
.model("ada")
.echo(true)
.build();
It would be nice to be able to do something like :
CompletionRequest completionRequest = CompletionRequest.builder()
.prompt("Somebody once told me the world is gonna roll me")
.model(Model.ada)
.echo(true)
.build();
With the current setup, it fails at runtime with a 404 when the model is invalid
Exception in thread "main" retrofit2.adapter.rxjava2.HttpException: HTTP 404
at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:57)
at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:38)
at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:48)
at io.reactivex.Observable.subscribe(Observable.java:10151)
It would be a nice-to-have to provide a mechanism to access models in a statically typed fashion rather than using the hard coded Strings.
From the onboarding example, rather than :
It would be nice to be able to do something like :
With the current setup, it fails at runtime with a 404 when the model is invalid