OpenAI has added "function calling" feature to the Chat api
https://openai.com/blog/function-calling-and-other-api-updates
We could leverage this feature to allow interfAIce proxies to call upon other methods
ex)
interface FunctionAware<T> {
fun withFunction( ... ): T
fun withFunctions( ... ): T
}
interface WeatherService : FunctionAware<WeatherService> {
fun getWeather(): Weather
}
val proxy = OpenAiProxyFactory.of("sk-****").create<WeatherService>()
proxy
.withFunction(weatherClient::greet)
.getWeather()
OpenAI has added "function calling" feature to the Chat api
https://openai.com/blog/function-calling-and-other-api-updates
We could leverage this feature to allow interfAIce proxies to call upon other methods
ex)