I'm happy to announce the first release of <interf...
# spring
m
I'm happy to announce the first release of interfAIce, a new open source library written in Kotlin interfAIce is an automatic proxy generation library that lets you harness the power of ChatGPT into your applications - just by defining an interface. The auto-generated proxy will query the OpenAI api based on your method definition(name, parameters, returnType, etc) and return the LLM's response in any Kotlin/Java type you want! The library also comes with support for: • spring boot • Kotlin Coroutines & Java Reactor If you're interested, check out my blog post for more Slack Conversation
k
I've read your blog post and readme and I still don't understand where would I use this? afaiu it creates implementation based on what AI returns? if so, will my application becomes undeterministic?
m
Well since the emergence of GPT4, many products that operate upon GPT results were released. This library just makes that kind of integration easier.
r
@kqr Agreed, I’ve got about 10000 questions raised in my head. But I think the most obvious answer is that tests will become even more important with this kind of technology. As long as your tests are fine, the implementation doesn’t really matter.
👍 1
m
You're right. As for now, I don't see LLMs replacing actual code implementations. But there are still cases that only gpt could handle with its power to interpret natural language. ex) you want to auto-classify user posts
Copy code
enum class PostType {
    GENERAL,
    QUESTION,
    DEBATE,
    ...
    ;
}
data class Post(
    ... // some Post class that you use in your application
)
interface PostClassificationService {
    fun classifyPost(post: Post): PostType
}
And in the future - who knows? maybe AI will evolve to become fast and precise enough to replace written implementations too
👍 2