Move vector file attach code to OpenAIVectorStoreMixin

This moves the vector store file attach code to the
OpenAIVectorStoreMixin. It also centralizes the mime type and pdf
parsing logic into the existing functions in vector_store.py by making
a small refactor there to allow us to use the same code path.

Signed-off-by: Ben Browning <bbrownin@redhat.com>
This commit is contained in:
Ben Browning 2025-06-11 20:06:30 -04:00
parent 055885bd5a
commit 788d34d8b4
4 changed files with 99 additions and 90 deletions

View file

@ -327,7 +327,7 @@ def test_response_non_streaming_file_search(
vector_store_id=vector_store.id,
file_id=file_response.id,
)
assert file_attach_response.status == "completed"
assert file_attach_response.status == "completed", f"Expected file to be attached, got {file_attach_response}"
assert not file_attach_response.last_error
# Update our tools with the right vector store id