Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Unknown parameter: 'attachments[0].tools[0].file_search'." #886

Open
1 task done
bradleyball opened this issue Jun 6, 2024 · 3 comments
Open
1 task done

"Unknown parameter: 'attachments[0].tools[0].file_search'." #886

bradleyball opened this issue Jun 6, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@bradleyball
Copy link

Confirm this is a Node library issue and not an underlying OpenAI API issue

  • This is an issue with the Node library

Describe the bug

with the new api update there should be a file_search object available on the tools array when passing to attachments

attachments: [ { file_id: 'fileid', tools: [{ type: 'file_search', file_search: { max_num_results: 50 } }], }, { file_id: 'fileidl', tools: [{ type: 'file_search', file_search: { max_num_results: 50 } }], }, ],

however I get a 400 error when creating messages "Unknown parameter: 'attachments[0].tools[0].file_search'."

no typescript errors when passing this information

To Reproduce

see above

Code snippets

No response

OS

mac

Node version

v18.5.0

Library version

"^4.48.2"

@bradleyball bradleyball added the bug Something isn't working label Jun 6, 2024
@meorphis
Copy link
Contributor

meorphis commented Jun 6, 2024

Thanks for the report @bradleyball. We'll take a look.

@meorphis
Copy link
Contributor

meorphis commented Jun 7, 2024

We were able to repro and are working on resolving. We'll keep you posted. Thanks again for reporting.

@meorphis
Copy link
Contributor

meorphis commented Jun 9, 2024

We've removed this parameter since it was included erroneously. You can instead specify the max_num_results when creating the run (https://platform.openai.com/docs/api-reference/runs/createRun - see file_search.max_num_results in the tools array).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants