Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: replaced initialize_agent with create_react_agent in dalle_image_generator.ipynb #30697

Merged

Conversation

aaronlaitner
Copy link
Contributor

Description:

Replaced deprecated 'initialize_agent' with 'create_react_agent' in dalle_image_generator.ipynb

Issue:

#29277

Dependencies:

None

Twitter handle:

@Thatopman

Replaced deprecated 'initialize_agent' with 'create_react_agent' in dalle_image_generator.ipynb
Copy link

vercel bot commented Apr 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 7, 2025 1:33pm

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. 🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder labels Apr 6, 2025
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Apr 6, 2025
@@ -34,7 +34,7 @@
"\n",
"from langchain_openai import OpenAI\n",
"\n",
"os.environ[\"OPENAI_API_KEY\"] = \"<your-key-here>\""
"os.environ[\"OPENAI_API_KEY\"] = \"insertapikey\""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change this?

"# Sending the message to be processed and adjusted by ChatGPT, after which is sent through DALL-E\n",
"response = agent.invoke({\"messages\": messages})\n",
"\n",
"print(response)"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work if you run it? Why is there no output?

"tools = load_tools([\"dalle-image-generator\"])\n",
"agent = initialize_agent(tools, llm, agent=\"zero-shot-react-description\", verbose=True)\n",
"output = agent.run(\"Create an image of a halloween night at a haunted museum\")"
"llm = ChatOpenAI(model=\"gpt-3.5-turbo\", temperature=0)\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why choose gpt-3.5-turbo, a legacy model, instead of a more modern model like gpt-4o-mini?

@ccurme ccurme enabled auto-merge (squash) April 7, 2025 13:25
@ccurme ccurme self-assigned this Apr 7, 2025
@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Apr 7, 2025
@ccurme ccurme merged commit 4f9f97b into langchain-ai:master Apr 7, 2025
13 checks passed
@aaronlaitner aaronlaitner deleted the update-dalle-image-generator branch April 7, 2025 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder lgtm PR looks good. Use to confirm that a PR is ready for merging. size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants