ai-patterns/langchain4j-function-calling/src/main/java/services/gemini/Langchain4JFunctionCallingApplication.java [111:133]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	private void functionCallGeminiWithGRPC(String userMessage) {
		long start = System.currentTimeMillis();

		ChatLanguageModel model = VertexAiGeminiChatModel.builder()
				.project(project)
				.location(location)
				.modelName(chatModel)
				.temperature(0.2f)
				.maxOutputTokens(1000)
				.build();

		FunctionCallingService service = new FunctionCallingService();

		Assistant assistant = AiServices.builder(Assistant.class)
				.chatLanguageModel(model)
				.chatMemory(MessageWindowChatMemory.withMaxMessages(10))
				.tools(service)
				.build();

		System.out.println("User message: " + userMessage);
		System.out.println(assistant.chat(userMessage));
		System.out.println("VertexAI Gemini call using GRPC took " + (System.currentTimeMillis() - start) + " ms");
	}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



ai-patterns/langchain4j-function-calling-openai-api/src/main/java/services/gemini/Langchain4JFunctionCallingApplication.java [155:177]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	private void functionCallGeminiWithGRPC(String userMessage) {
		long start = System.currentTimeMillis();

		ChatLanguageModel model = VertexAiGeminiChatModel.builder()
				.project(project)
				.location(location)
				.modelName(chatModel)
				.temperature(0.2f)
				.maxOutputTokens(1000)
				.build();

		FunctionCallingService service = new FunctionCallingService();

		Assistant assistant = AiServices.builder(Assistant.class)
				.chatLanguageModel(model)
				.chatMemory(MessageWindowChatMemory.withMaxMessages(10))
				.tools(service)
				.build();

		System.out.println("User message: " + userMessage);
		System.out.println(assistant.chat(userMessage));
		System.out.println("VertexAI Gemini call using GRPC took " + (System.currentTimeMillis() - start) + " ms");
	}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



