image generation looping issue #7

Open
opened 2026-02-16 05:17:18 -05:00 by yindo · 0 comments
Owner

Originally created by @Zenodia on GitHub (Aug 22, 2024).

Problem :
I cloned and modified the toy examples here https://github.com/langchain-ai/langgraph-example.git
and modified to use image generation ( API call from ai.nvidia.com )
however, whenever my query is using this tool, it kept looping without able to give back an answer.

Could someone please take a look ?

expect output:
the agent answer where the generated image is located, it should something similar to the below :
Sure, the generated image is saved to this location : output.jpg

Steps to repeat :
follow the instruction from official langgraph studio repo https://github.com/langchain-ai/langgraph-studio?tab=readme-ov-file#setup up to Setup
clone my modified repo instead https://github.com/Zenodia/langgraphstudio_zcharpy and proceed the steps as usual until set keys in .env

follow this link and obtain NVIDIA_API_KEY https://python.langchain.com/v0.2/docs/integrations/chat/nvidia_ai_endpoints/#setup
create .env file and obtain NVIDIA_API_KEY
in a terminal also export it , making sure the NVIDIA_API_KEY exist in the environment
export NVIDIA_API_KEY
then spin up the LangGraph Studio app , in the UI
try the following query :
make an image of a beautiful town

Originally created by @Zenodia on GitHub (Aug 22, 2024). **Problem :** I cloned and modified the toy examples here https://github.com/langchain-ai/langgraph-example.git and modified to use image generation ( API call from ai.nvidia.com ) however, whenever my query is using this tool, it kept looping without able to give back an answer. Could someone please take a look ? **expect output:** the agent answer where the generated image is located, it should something similar to the below : Sure, the generated image is saved to this location : output.jpg **Steps to repeat :** follow the instruction from official langgraph studio repo https://github.com/langchain-ai/langgraph-studio?tab=readme-ov-file#setup up to Setup clone my modified repo instead https://github.com/Zenodia/langgraphstudio_zcharpy and proceed the steps as usual until set keys in .env follow this link and obtain NVIDIA_API_KEY https://python.langchain.com/v0.2/docs/integrations/chat/nvidia_ai_endpoints/#setup create .env file and obtain NVIDIA_API_KEY in a terminal also export it , making sure the NVIDIA_API_KEY exist in the environment export NVIDIA_API_KEY then spin up the LangGraph Studio app , in the UI try the following query : make an image of a beautiful town
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph-example#7