You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that the files in the resources folder being uploaded are binary files. However, when you prompt (how many countries have population more than usa) the llm to answer question for it, it is expecting a text file.
Output from LLM: # AuthorRole.ASSISTANT: I am currently unable to access the content of the uploaded files due to an unexpected issue. Please try re-uploading the files or converting them to a different format, such as Excel or CSV, to see if that resolves the issue.
If I change the file open call from 'rb' to 'r', i get this error:
File "C:\r\learn\semantic-kernel\.venv\Lib\site-packages\httpx\_multipart.py", line 163, in __init__
raise TypeError(
"Multipart file uploads must be opened in binary mode, not text mode."
)
TypeError: Multipart file uploads must be opened in binary mode, not text mode.
Am I missing something?
The text was updated successfully, but these errors were encountered:
Hello @jayman-dalal, what version of SK Python are you using? What is your Azure OpenAI api version?
I am not able to repro this issue - the only issue I am hitting is that I can upload the first file, but then the AsyncAzureOpenAI client hangs (for a long time) while uploading the second file. I don't see this directly hitting OpenAI. Will need to raise the issue with the Azure OpenAI Assistants team.
@jayman-dalal, note: when I upgraded the openai package to 1.77.0, that fixed the hang I saw while uploading files. As I said in my previous response, I am able to run the sample without errors. My Azure OpenAI api version is 2025-02-01-preview.
It seems that the files in the
resources
folder being uploaded are binary files. However, when you prompt (how many countries have population more than usa
) the llm to answer question for it, it is expecting a text file.Output from LLM:
# AuthorRole.ASSISTANT: I am currently unable to access the content of the uploaded files due to an unexpected issue. Please try re-uploading the files or converting them to a different format, such as Excel or CSV, to see if that resolves the issue.
If I change the file open call from
'rb'
to'r'
, i get this error:Error:
Am I missing something?
The text was updated successfully, but these errors were encountered: