go-openai icon indicating copy to clipboard operation
go-openai copied to clipboard

Add file ID for search request?

Open aliak00 opened this issue 3 years ago • 1 comments

Hey! Is it possible to add the option to specify a file ID in the SearchRequest and the return_metadata?

https://beta.openai.com/docs/api-reference/searches/create#searches/create-file

aliak00 avatar Jan 23 '22 21:01 aliak00

HI @aliak00,

I know this answer is super late but adding the file ID parameter to the request body is possible as well as adding the return_metadata, but I'm not sure what kind of type the return_metadata woud be, is it string or something else as it's not clearly explained in the OpenAI's docs.

New accounts created after today will not have access to these endpoint.

Also, currently the Searches, Classifications, Answers, and Engines endpoints are deprecated and they did mention it somewhere that new accounts that just got access to OpenAI won't have access to the deprecated endpoints, so updating this repo's answers.go and search.go is possible, but we'll probably have to remove them after December 3rd, 2022 or whenever OpenAI has stopped supporting them completely.

Here are some of the references:

@sashabaranov what do you think? We could update the search.go and solve this issue as there are still some months left until OpenAI completely removes the support, this may still be used by devs who still have access to the endpoints.

Also, we could leave it opened until December 3rd, 2022 — or even just close the issue as struggling for it is kinda redundant. All options are acceptable, but what do you guys think? @aliak00 @sashabaranov

galpt avatar Jul 02 '22 01:07 galpt

@galpt @aliak00 it seems that search API is now deprecated, I'm removing it from the library in #51 PR

sashabaranov avatar Jan 06 '23 20:01 sashabaranov