mirror of
https://github.com/alibaba/higress.git
synced 2026-06-09 12:47:28 +08:00
fix: set "EnableSemanticCachefalse" to false when no vector configured in ai-cache (#2351)
This commit is contained in:
@@ -90,6 +90,8 @@ func (c *PluginConfig) FromJson(json gjson.Result, log wrapper.Log) {
|
|||||||
|
|
||||||
if json.Get("enableSemanticCache").Exists() {
|
if json.Get("enableSemanticCache").Exists() {
|
||||||
c.EnableSemanticCache = json.Get("enableSemanticCache").Bool()
|
c.EnableSemanticCache = json.Get("enableSemanticCache").Bool()
|
||||||
|
} else if c.GetVectorProvider() == nil {
|
||||||
|
c.EnableSemanticCache = false // set value to false when no vector provider
|
||||||
} else {
|
} else {
|
||||||
c.EnableSemanticCache = true // set default value to true
|
c.EnableSemanticCache = true // set default value to true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user