-
Notifications
You must be signed in to change notification settings - Fork 17.1k
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
docs: replaced initialize_agent with create_react_agent in dalle_image_generator.ipynb #30697
Conversation
Replaced deprecated 'initialize_agent' with 'create_react_agent' in dalle_image_generator.ipynb
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -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\"" |
There was a problem hiding this comment.
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)" |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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?
Description:
Replaced deprecated 'initialize_agent' with 'create_react_agent' in dalle_image_generator.ipynb
Issue:
#29277
Dependencies:
None
Twitter handle:
@Thatopman