PHondogo
09/20/2025, 3:21 PMGemy
09/20/2025, 3:22 PMEl Anthony
09/20/2025, 3:42 PMPHondogo
09/20/2025, 3:45 PMEl Anthony
09/20/2025, 6:34 PMclass KoogOllamaTest {
private val OLLAMA_MODEL_NAME = "qwen3:14b"
val ollamaModel = LLModel(
provider = LLMProvider.Ollama,
id = OLLAMA_MODEL_NAME,
capabilities = listOf(
LLMCapability.Temperature,
LLMCapability.Schema.JSON.Basic,
LLMCapability.Tools
),
contextLength = 40_960,
)
val agent = AIAgent(
executor = simpleOllamaAIExecutor(
baseUrl = "http://localhost:11434"
),
llmModel = ollamaModel,
systemPrompt = text {
+ "You're a helpful agent"
+ "/no_think"
}
)
fun run( question: String) = runBlocking {
agent.run( question)
}
companion object {
@JvmStatic
fun main(args: ArrayString) {
// KoogOllamaTest().testGetCurrentDate()
val res = KoogOllamaTest().run("What's the name of the 3rd planet around the sun?")
println(res)
}
}
}PHondogo
09/20/2025, 7:21 PM