mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
Disable the cache by default and make it experimental
This commit is contained in:
parent
1876132172
commit
e2d372823a
14 changed files with 101 additions and 34 deletions
|
@ -176,7 +176,7 @@ pub struct Embedder {
|
|||
}
|
||||
|
||||
impl Embedder {
|
||||
pub fn new(options: EmbedderOptions) -> Result<Self, NewEmbedderError> {
|
||||
pub fn new(options: EmbedderOptions, cache_cap: usize) -> Result<Self, NewEmbedderError> {
|
||||
let mut inferred_api_key = Default::default();
|
||||
let api_key = options.api_key.as_ref().unwrap_or_else(|| {
|
||||
inferred_api_key = infer_api_key();
|
||||
|
@ -201,6 +201,7 @@ impl Embedder {
|
|||
}),
|
||||
headers: Default::default(),
|
||||
},
|
||||
cache_cap,
|
||||
super::rest::ConfigurationSource::OpenAi,
|
||||
)?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue