mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
Ignore unexisting chat completions settings folder
This commit is contained in:
parent
a051ab3d9a
commit
6e6fd077d4
1 changed files with 5 additions and 1 deletions
|
@ -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<_>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue