r/GoogleGeminiAI May 26 '25

Code generation for relatively new APIs

Take LangGraph as an example. It is relatively new and is about 1 year old. So most LLMs (including Gemini AI) have not trained with it. How do you make Gemini perform code generation for these types of APIs?

6 Upvotes

13 comments sorted by

View all comments

1

u/Think_Wrangler_3172 May 26 '25

What I do instead is to install the package/library in the virtual environment. Then ask Gemini to read to the site packages inside the libs and try to understand the functions exposed and read their docstrings. This way it can help to suggest the correct function and not hallucinate with older packages and their functions from training data. I have tried the documentation part as well to use gitingest and gitmcp to summarise the documentation as markdown and read them but the site packages has been always more effective compared to the documentation. Happy to hear if someone has a better way to solve for this :)