this adds kotlin support for using the ChatClient
to get typesafe responses back
val joke:Joke = cc
.prompt("tell me a joke")
.call()
.entity<Joke>()
println(joke)
this is as opposed to the more verbose and less idiomatic Kotlin code without the extension function
`
val joke : Joke = cc
.prompt("tell me a joke")
.call()
.entity(Joke::class.java)
Comment From: sdeleuze
Also please add an extension for responseEntity(...)
as well.
Comment From: joshlong
ive updated the PR accordingly. thanks for the great feedback
Comment From: markpollack
merge in 944fb996e421d3a9cded77220551bc710957eb6b