Dalle wrapper image size #7701
Replies: 1 comment
-
Hello, @joshpopelka20gmail! I'm here to assist you with your LangChain-related query. Let's work together to resolve the issue you've encountered. The error "The size is not supported by this model" occurs because the size "512x512" is not supported by the DALL·E-3 model. For DALL·E-3, the supported sizes are "1024x1024", "1792x1024", or "1024x1792" [1]. To resolve this, you should change the const tool = new DallEAPIWrapper({
n: 1, // Default
model: "dall-e-3", // Default
apiKey: process.env.OPENAI_API_KEY, // Default
size: "1024x1024", // Use a supported size for DALL·E-3
}); This should resolve the error and allow you to generate images with the DALL·E-3 model. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
Beta Was this translation helpful? Give feedback.
-
Checked other resources
Commit to Help
Example Code
Description
I've tried to add image size to the DalleAPIWrapper, but I get this error:
System Info
[email protected] | MIT | deps: 12 | versions: 310
Typescript bindings for langchain
https://github.com/langchain-ai/langchainjs/tree/main/langchain/
keywords: llm, ai, gpt3, chain, prompt, prompt engineering, chatgpt, machine learning, ml, openai, embeddings, vectorstores
dist
.tarball: https://registry.npmjs.org/langchain/-/langchain-0.3.15.tgz
.shasum: c6c8b17bf20c870795e31515f48abde7d13ccc9d
.integrity: sha512-+DQ4I2iy4b5sErkxo6jAkgmumvhgqLwLB2fmiGl3yDt8+VVZdB1MUULZMzf+6ubarNc7Mwn/sxHUqK4GhEndhg==
.unpackedSize: 2.9 MB
dependencies:
@langchain/openai: >=0.1.0 <0.5.0 openapi-types: ^12.1.3
@langchain/textsplitters: >=0.0.0 <0.2.0 p-retry: 4
js-tiktoken: ^1.0.12 uuid: ^10.0.0
js-yaml: ^4.1.0 yaml: ^2.2.1
jsonpointer: ^5.0.1 zod-to-json-schema: ^3.22.3
langsmith: >=0.2.8 <0.4.0 zod: ^3.22.4
maintainers:
dist-tags:
latest: 0.3.15 tag-for-publishing-older-releases: 0.2.20
next: 0.3.2-rc.0
platform (windows)
node version (22.13)
npm version (10.9.2)
Beta Was this translation helpful? Give feedback.
All reactions