Skip to content

PNG and JPEG returning error #27

@apexerainc

Description

@apexerainc

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions