I checked new features in Gemini that have URL context | Gemini API | Google AI for Developers
Can we support this features in built-in tools as well ?
ChatGoogleGenerativeAI | 🦜️🔗 LangChain
Did you find a way to integrate Gemini’s URL context and LangChain? It would be great to have this feature
@hllj @mateo-st added here on PR 1371 feat(genai): add support to built-in `url_context` tool by wilyJ80 · Pull Request #1371 · langchain-ai/langchain-google · GitHub . will possibly be available in a next release. though it needs further improvements in integration in the Langchain ecosystem. Currently, it seems not supported to use both built-in Gemini tools with your own tools. Another more obvious limitation is incompatibility of these tools with create_agent. You could probably see the why of all it, but I think further developments could make the built-in tool usage more seamless. Currently, I’m using a separate subagent for these built-in tools because of these limitations, and I don’t think that’s ideal.
@wilyJ80 thanks for starting to address this. temporarily i managed to solve it by binding a Vertex tool directly to langchain llm
from google.cloud.aiplatform_v1beta1.types import Tool as VertexTool
llm.bind_tools([VertexTool(google_search={})])
but i feel rather uncomfortable with this approach (if routed to a non-gemini llm it might explode, and i need to wrap this as a subagent as well)
will be interesting to see how this evolves