Hi, I'm trying to make a basic usage of Koog but f...
# koog-agentic-framework
d
Hi, I'm trying to make a basic usage of Koog but falling at the first hurdle when constructing a client. Details in thread 👉 🧵
Get this error as if the constructor isn't on the class-path:
Copy code
Exception in thread "main" java.lang.NoSuchMethodError: 'void ai.koog.prompt.executor.clients.openai.OpenAILLMClient.<init>(java.lang.String, ai.koog.prompt.executor.clients.openai.OpenAIClientSettings, io.ktor.client.HttpClient, kotlin.time.Clock, int, kotlin.jvm.internal.DefaultConstructorMarker)'
...and the line it fails on is simply:
Copy code
val executor: PromptExecutor = SingleLLMPromptExecutor(OpenAILLMClient(apiKey, openaiConfig))
I've got
ai.koog:koog-agents:0.3.0
in my implementation. Looks like version skew but I don't have any other transitive Koog dependencies.
Are there any known packaging issues?
d
I use the 0.3..0 version in my app (though not the OpenAI client), so I don't think there is a problem with its packaging... Is the line you quoted in your code or in Koog's codebase? Also, can you check Gradle dependencies for Koog's transitive dependencies?
m
Are there any known packaging issues?
Hello! As of yet, we are not aware of packaging issues of this kind. Could you provide a little bit more info on how you reference the package?
d
I figured out the problem, a victim of the
kotlinx.datetime
0.7.1
migration 😕
😅 2
The
Clock
type mis-matching I suppose.
Discovered by going through the whole process of spinning up Koog in a new JVM App, then iterating it towards the bad config - it worked until I added the explicit
kotlinx.datetime
0.7.1
dependency.
🔥 1
d
Yeah you must use the 0.7.1-0.6.x-compat version for now.