mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-16 03:10:50 +00:00
Ignore unexisting chat completions settings folder
This commit is contained in:
@ -197,7 +197,11 @@ impl V6Reader {
|
||||
pub fn chat_completions_settings(
|
||||
&mut self,
|
||||
) -> Result<Box<dyn Iterator<Item = Result<(String, ChatCompletionSettings)>> + '_>> {
|
||||
let entries = fs::read_dir(self.dump.path().join("chat-completions-settings"))?;
|
||||
let entries = match fs::read_dir(self.dump.path().join("chat-completions-settings")) {
|
||||
Ok(entries) => entries,
|
||||
Err(e) if e.kind() == ErrorKind::NotFound => return Ok(Box::new(std::iter::empty())),
|
||||
Err(e) => return Err(e.into()),
|
||||
};
|
||||
Ok(Box::new(
|
||||
entries
|
||||
.map(|entry| -> Result<Option<_>> {
|
||||
|
Reference in New Issue
Block a user