pub struct CreateSearchRequest {
pub query: String,
pub documents: Option<Option<Vec<String>>>,
pub file: Option<Option<String>>,
pub max_rerank: Option<Option<i32>>,
pub return_metadata: Option<Option<bool>>,
pub user: Option<String>,
}
Fields§
§query: String
Query to search against the documents.
documents: Option<Option<Vec<String>>>
Up to 200 documents to search over, provided as a list of strings. The maximum document length (in tokens) is 2034 minus the number of tokens in the query. You should specify either documents
or a file
, but not both.
file: Option<Option<String>>
The ID of an uploaded file that contains documents to search over. You should specify either documents
or a file
, but not both.
max_rerank: Option<Option<i32>>
The maximum number of documents to be re-ranked and returned by search. This flag only takes effect when file
is set.
return_metadata: Option<Option<bool>>
A special boolean flag for showing metadata. If set to true
, each document entry in the returned JSON will contain a "metadata" field. This flag only takes effect when file
is set.
user: Option<String>
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
Implementations§
Source§impl CreateSearchRequest
impl CreateSearchRequest
pub fn new(query: String) -> CreateSearchRequest
Trait Implementations§
Source§impl Clone for CreateSearchRequest
impl Clone for CreateSearchRequest
Source§fn clone(&self) -> CreateSearchRequest
fn clone(&self) -> CreateSearchRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more