Hello, I have installed an instance of Gemma 4 on ...
# koog-agentic-framework
c
Hello, I have installed an instance of Gemma 4 on a Google Cloud Run instance. Now, I'd like to have another cloud run service based on Koog that will use this Gemma 4 instance to create an agent. I'm struggling to find the right values for the following:
Copy code
val llm = LLModel(
    provider = LLMProvider.Ollama,
    id = getenv("OLLAMA_MODEL"),
    capabilities = listOf(LLMCapability.Completion),
    contextLength = 35_000_000,
    maxOutputTokens = 35_000_000,
)
I don't know if there is a way to fill "provider". If it is possible, then I could use that Gemma 4 in Cloud Run almost like the one I have on my local Ollama. Thank you for your help!
w
I’m not very familiar with the model on Google Cloud Run. Can it be used with the OpenAI Responses/Chat Completations format?
c
Thank you for coming back to me @wwalkingg! Yes it seems like it because I could communicate to this agent via this following code:
w
Copy code
val gemma4 = LLModel(
        provider = LLMProvider.OpenAI,
        id = "google/gemma-4-E4B-it",
        capabilities = [LLMCapability.Completion]
    )

    val agent = AIAgent(
        promptExecutor = MultiLLMPromptExecutor(
            OpenAILLMClient(
                apiKey = "apiKey",
                settings = OpenAIClientSettings(
                    baseUrl = "google cloud run baseurl"
                )
            ),
        ),
        llmModel = gemma4
    )

    agent.runBlocking("hello").also { println(it) }
c
Yes ! Thank you ! For some reasons, I cannot make it accept the bracket syntax so I adapted my code following your inputs val gemma4Model = LLModel( provider = LLMProvider.OpenAI, id = "google/gemma-4-E4B-it", capabilities = listOf( LLMCapability.Temperature, LLMCapability.Completion, LLMCapability.OpenAIEndpoint.Completions ) ) and it worked. Thank you again !!
👍 1