-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
Dall-E Image Generator return url without authentication information #14223
Comments
🤖 Hello @majiayu000! I'm Dosu, a friendly bot helper for the LangChain repository. I'm here to assist you with bug solving, answering questions, and even getting you started on contributing if you're interested. While we wait for a human maintainer, I'm here to help you. Thank you for bringing this to our attention. It seems like the issue is with the way the Dall-E Image Generator in LangChain is handling the URL generation. The Here is the relevant code: def run(self, query: str) -> str:
"""Run query through OpenAI and parse result."""
response = self.client.images.generate(
prompt=query,
n=self.n,
size=self.size,
model=self.model,
quality=self.quality,
)
image_urls = self.separator.join([item.url for item in response.data])
return image_urls if image_urls else "No image was generated" In this code, The URL could be cut off due to several reasons:
We will look into this issue and try to find a solution. In the meantime, you might want to check the values of the path parameters and make sure they are correctly formatted and URL-encoded. Also, please ensure that the placeholders in the URL match the keys in the path parameters dictionary. Thank you for your patience and understanding. If you have any other questions or need further clarification, please don't hesitate to ask. Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
@majiayu000 Have you solved this issue? I also encountered the same problem. |
I did not fix this. |
the Dall-E generated links will only work for 1 hour so what you should do is get the url then download it or if you want to use like firebase you can use the api to uplod to the bucket and get the downloadable url but when uploading to firebase make the expiration date to un expiredable or set duration
|
System Info
MacOS
Who can help?
No response
Information
Related Components
Reproduction
As described in the docs page:
Below is output:
Seems ok? But the url has been cut, it not origin! So you will not get the right picture.
Instead got this:
Expected behavior
Dalle is a import tool in openai.
I want get the picture which I can see it. So it should give me the origin link.
Just like this:
The text was updated successfully, but these errors were encountered: