Open apexerainc opened 2 months ago
Are you using Azure Openai instead of Openai? Azure doesn't support image file from file search of assistant api.
Same problem, but also with openai api: BadRequestError: Error code: 400 - {'error': {'message': 'Files with extensions
[.jpg] are not supported for retrieval. See
https://platform.openai.com/docs/assistants/tools/file-search/supported-files',
'type': 'invalid_request_error', 'param': None, 'code': 'unsupported_file'}}
And the page includes no image files.
When I go to upload an image to my assistant I get this call back (other file types work) Traceback: File "/Users/portal/Library/Caches/pypoetry/virtualenvs/gpt-assistants-api-ui-FZcNcgmK-py3.11/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 600, in _run_script exec(code, module.dict) File "/Users/portal/gpt-assistants-api-ui/app.py", line 336, in
main()
File "/Users/portal/gpt-assistants-api-ui/app.py", line 330, in main
load_chat_screen(single_agent_id, single_agent_title)
File "/Users/portal/gpt-assistants-api-ui/app.py", line 288, in load_chat_screen
run_stream(user_msg, file, assistant_id)
File "/Users/portal/gpt-assistants-api-ui/app.py", line 208, in run_stream
create_message(st.session_state.thread, user_input, file)
File "/Users/portal/gpt-assistants-api-ui/app.py", line 171, in create_message
client.beta.threads.messages.create(
File "/Users/portal/Library/Caches/pypoetry/virtualenvs/gpt-assistants-api-ui-FZcNcgmK-py3.11/lib/python3.11/site-packages/openai/resources/beta/threads/messages.py", line 88, in create
return self._post(
^^^^^^^^^^^
File "/Users/portal/Library/Caches/pypoetry/virtualenvs/gpt-assistants-api-ui-FZcNcgmK-py3.11/lib/python3.11/site-packages/openai/_base_client.py", line 1240, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/portal/Library/Caches/pypoetry/virtualenvs/gpt-assistants-api-ui-FZcNcgmK-py3.11/lib/python3.11/site-packages/openai/_base_client.py", line 921, in request
return self._request(
^^^^^^^^^^^^^^
File "/Users/portal/Library/Caches/pypoetry/virtualenvs/gpt-assistants-api-ui-FZcNcgmK-py3.11/lib/python3.11/site-packages/openai/_base_client.py", line 1020, in _request
raise self._make_status_error_from_response(err.response) from None
Any idea why?