Skip to content

Support Function calling #30

Description

@mscheong01

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()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions