mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 11:50:54 +07:00
ML in SE: account for possible json processing errors when reading embedding model artifacts
GitOrigin-RevId: e574db3508bef72f9a56004c4bff694157ca5520
This commit is contained in:
committed by
intellij-monorepo-bot
parent
43a2ec67fa
commit
644ed69469
@@ -1,6 +1,7 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.platform.ml.embeddings.services
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.application.PathManager
|
||||
import com.intellij.openapi.components.Service
|
||||
@@ -48,6 +49,10 @@ class LocalEmbeddingServiceProvider {
|
||||
logger.warn("Local embedding model artifacts not found: $e")
|
||||
null
|
||||
}
|
||||
catch (e: JsonProcessingException) {
|
||||
logger.warn("Local embedding model artifacts JSON processing failure")
|
||||
null
|
||||
}
|
||||
}
|
||||
localServiceRef = SoftReference(service)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user