I am trying to fine-tune the behavior of file_search by supplying a ranking_options parameter as described in the API docs:
https://platform.openai.com/docs/api-reference/vector-stores/search
My assistants code is as follows:
r_options = {
# ignore chunks below 62.5% similarity score
"score_threshold": 0.625,
"ranker": "default_2024_08_21"
}
assistant = client.beta.assistants.create(
name="My Assistant Bot",
instructions='You are a polite, helpful, and intelligent assistant',
model='gpt-4-turbo-2024-04-09',
temperature=0,
tools=[{"type": "file_search"}],
tool_resources={
"file_search": {
"vector_store_ids": [vs_id],
"ranking_options": r_options
}
}
)
I believe the above code ought to modify the default behavior of file_search. Instead, I get the following error:
BadRequestError: Error code: 400 - {âerrorâ: {âmessageâ: âUnknown parameter: âtool_resources.file_search.ranking_optionsâ.â, âtypeâ: âinvalid_request_errorâ, âparamâ: âtool_resources.file_search.ranking_optionsâ, âcodeâ: âunknown_parameterâ}}
Am I using ranking_options incorrectly? Or is ranking_options still not supported by the API? If itâs the latter, does anyone know when ranking_options will be supported by OpenAI?