Azure-Samples / azureai-samples

Official community-driven Azure AI Examples
MIT License
262 stars 179 forks source link

ModuleNotFoundError: No module named 'openai.types.beta.threads.message_content_image_file' #115

Open Linda2023AI opened 3 months ago

Linda2023AI commented 3 months ago

Operating System

Windows

Version Information

I ran the code assistant-math_tutor at codespaces. I got the error that ModuleNotFoundError: No module named 'openai.types.beta.threads.message_content_image_file'

Python Version: 3.10

Steps to reproduce

from openai.types.beta.threads.message_content_image_file import MessageContentImageFile from openai.types.beta.threads.message_content_text import MessageContentText

Expected behavior

no error

Actual behavior

can not load the from openai.types.beta.threads.message_content_image_file import MessageContentImageFile from openai.types.beta.threads.message_content_text import MessageContentText

Addition information

No response

PurnaChandraPanda commented 3 months ago

@Linda2023AI

With latest openai sdk, that class seems to be deprecated. You could refer the working solution from https://github.com/Azure-Samples/azureai-samples/issues/124#issuecomment-2266349696.