google adk - agentic RAG basic code using custom model
There's alot of example that uses Gemini to do a RAG call. In this example I am going to use a custom llm engine to perform a RAG that I have setup in Agentic platform. I assume you have setup a RAG with your document. So instead of using the genai apporach, we are now using agentic approach to query our RAG. import asyncio from urllib import response from google . adk . agents import Agent from google . adk . runners import Runner from google . adk . sessions import InMemorySessionService from google . genai import types from google . adk . agents . callback_context import CallbackContext from google . adk . models . llm_request import LlmRequest from datetime import datetime import os import logging from vertexai . preview import rag from google . adk . agents . llm_agent import LlmAgent from google . adk . models . lite_llm import LiteLlm import google . cloud . logging from google . adk . tools . retrieval . vertex_ai_rag_retrieval ...