But the openai list api does accept an optional filter "purpose."
Also, I wouldn't be surprised if OpenAI updates the organization list files API to accept the same query parameters as the Assistant's list.
The current async-openai query in freeform format is pretty cool, as it allows for adaptability and future-proofing for these smaller details.
Solution
Three options:
1) Add the Q: Serialize argument (pros: consistency with Assistant files list, cons: breaking change).
2) Add another list_with_query function (pros: no breaking change, cons: asymmetry with Assistant files list).
3) Wait until OpenAI introduces more query parameters (purpose doesn't seem to be a major filter anyway, and they seem okay with returning all anyway).
Personally, I think any of those three options could be reasonable.
Problem
Right now, the api to list files of an org does not seem to take query parameters.
But the openai list api does accept an optional filter "purpose."
Also, I wouldn't be surprised if OpenAI updates the organization list files API to accept the same query parameters as the Assistant's list.
The current async-openai
query
in freeform format is pretty cool, as it allows for adaptability and future-proofing for these smaller details.Solution
Three options:
1) Add the
Q: Serialize
argument (pros: consistency with Assistant files list, cons: breaking change).2) Add another
list_with_query
function (pros: no breaking change, cons: asymmetry with Assistant files list).3) Wait until OpenAI introduces more query parameters (purpose doesn't seem to be a major filter anyway, and they seem okay with returning all anyway).
Personally, I think any of those three options could be reasonable.