#DALL-E DALL-E and openai api key differencess
35 messages · Page 1 of 1 (latest)
sorry but that does not help me as it kind of works and i dont get a error reply but the generatet image is not available
thats why i have asked in here if there are differnces and how it works
because its either that i have made a mistake in my code or that i am missusing the api
thank you for the reply
let me send you a example i got as answer
for example
imgur shows the image is not longer available or does not exist
i am pretty new to coding so i am a bit overasked curently what the problem there is
i have a python telegram ai chatbot which currently works with text davinci and i wantet to integrate a second function which allows the users to generate images and that is the reply i get from the bot
how can i seperate those two i have it currently so that the bot has a seperation between just the text and the mention for text davinci and a secondary for text mention and the words generate image
but that makes sense what your saying that should be a mistake on my side with my code
the dalle api is a separate api, look on our api docs
An API for accessing new AI models developed by OpenAI
same api key but different api?
thats how i have defined the function in my function which gets called when all triggers are met
def process_images_privat(update, context):
message_text = update.message.text
response = openai.Image.create(
prompt=message_text,
size="1024x1024",
model="image-alpha-003",
api_key=openai.api_key,
)
image_url = response["data"]["url"]
context.bot.send_photo(chat_id=update.effective_chat.id, photo=image_url)
called so:
elif (
update.message is not None
and bot_username in update.message.text
and "generate image" in update.message.text
):
process_images_privat(update, context)
The image urls expire after an hour after generation, so that could also be a possible reason
ive tested it in the same moment its still in my test version of my bot
I would just test the image_url part and make sure that is working before you try and send it off anywhere
But I dont code in python so I cant really help you with the syntax stuff beyond that
thank you for the tip it looks like its a problem on my side with my code because when i try to print the result its prints the result from the response text part not the result of the response image url part so it looks like the process image function is never been called but frontrun by the response text calculation