Skip to content

Commit 91b3d8a

Browse files
committed
lint
Signed-off-by: bitliu <[email protected]>
1 parent 825df4b commit 91b3d8a

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

config/semantic-cache/milvus.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This configuration file contains settings for using Milvus as the semantic cache backend.
33
# To use this configuration:
44
# 1. Set backend_type: "milvus" in your main config.yaml
5-
# 2. Set backend_config_path: "config/cache/milvus.yaml" in your main config.yaml
5+
# 2. Set backend_config_path: "config/semantic-cache/milvus.yaml" in your main config.yaml
66
# 3. Ensure Milvus server is running and accessible
77
# 4. Build with Milvus support: go build -tags=milvus
88

config/testing/config.e2e.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ semantic_cache:
1111

1212
# For production environments, use Milvus for scalable caching:
1313
# backend_type: "milvus"
14-
# backend_config_path: "config/cache/milvus.yaml"
14+
# backend_config_path: "config/semantic-cache/milvus.yaml"
1515

1616
# Development/Testing: Use in-memory cache (current configuration)
1717
# - Fast startup and no external dependencies

src/semantic-router/pkg/cache/cache_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ connection:
730730
MaxEntries: 2000,
731731
TTLSeconds: 7200,
732732
EmbeddingModel: "bert",
733-
BackendConfigPath: "config/cache/milvus.yaml",
733+
BackendConfigPath: "config/semantic-cache/milvus.yaml",
734734
}
735735

736736
// Verify all fields are accessible
@@ -739,7 +739,7 @@ connection:
739739
Expect(config.SimilarityThreshold).To(Equal(float32(0.9)))
740740
Expect(config.MaxEntries).To(Equal(2000))
741741
Expect(config.TTLSeconds).To(Equal(7200))
742-
Expect(config.BackendConfigPath).To(Equal("config/cache/milvus.yaml"))
742+
Expect(config.BackendConfigPath).To(Equal("config/semantic-cache/milvus.yaml"))
743743
})
744744
})
745745

@@ -1695,13 +1695,13 @@ func getMilvusConfigPath() string {
16951695
}
16961696

16971697
// Try relative from project root (when run via make)
1698-
configPath := "config/cache/milvus.yaml"
1698+
configPath := "config/semantic-cache/milvus.yaml"
16991699
if _, err := os.Stat(configPath); err == nil {
17001700
return configPath
17011701
}
17021702

17031703
// Fallback to relative from test directory
1704-
return "../../../../../config/cache/milvus.yaml"
1704+
return "../../../../../config/semantic-cache/milvus.yaml"
17051705
}
17061706

17071707
// BenchmarkHybridVsMilvus is the comprehensive benchmark comparing hybrid cache vs pure Milvus

src/semantic-router/pkg/config/config_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,7 +1281,7 @@ semantic_cache:
12811281
backend_type: "milvus"
12821282
similarity_threshold: 0.9
12831283
ttl_seconds: 7200
1284-
backend_config_path: "config/cache/milvus.yaml"
1284+
backend_config_path: "config/semantic-cache/milvus.yaml"
12851285
`
12861286
err := os.WriteFile(configFile, []byte(configContent), 0o644)
12871287
Expect(err).NotTo(HaveOccurred())
@@ -1295,7 +1295,7 @@ semantic_cache:
12951295
Expect(cfg.SemanticCache.BackendType).To(Equal("milvus"))
12961296
Expect(*cfg.SemanticCache.SimilarityThreshold).To(Equal(float32(0.9)))
12971297
Expect(cfg.SemanticCache.TTLSeconds).To(Equal(7200))
1298-
Expect(cfg.SemanticCache.BackendConfigPath).To(Equal("config/cache/milvus.yaml"))
1298+
Expect(cfg.SemanticCache.BackendConfigPath).To(Equal("config/semantic-cache/milvus.yaml"))
12991299

13001300
// MaxEntries should be ignored for Milvus backend
13011301
Expect(cfg.SemanticCache.MaxEntries).To(Equal(0))
@@ -1475,7 +1475,7 @@ semantic_cache:
14751475
backend_type: "milvus"
14761476
similarity_threshold: 0.85
14771477
ttl_seconds: 86400 # 24 hours
1478-
backend_config_path: "config/cache/milvus.yaml"
1478+
backend_config_path: "config/semantic-cache/milvus.yaml"
14791479
14801480
categories:
14811481
- name: "production"
@@ -1505,7 +1505,7 @@ default_model: "gpt-4"
15051505
Expect(cfg.SemanticCache.BackendType).To(Equal("milvus"))
15061506
Expect(*cfg.SemanticCache.SimilarityThreshold).To(Equal(float32(0.85)))
15071507
Expect(cfg.SemanticCache.TTLSeconds).To(Equal(86400))
1508-
Expect(cfg.SemanticCache.BackendConfigPath).To(Equal("config/cache/milvus.yaml"))
1508+
Expect(cfg.SemanticCache.BackendConfigPath).To(Equal("config/semantic-cache/milvus.yaml"))
15091509

15101510
// Verify threshold resolution
15111511
threshold := cfg.GetCacheSimilarityThreshold()
@@ -1530,7 +1530,7 @@ semantic_cache:
15301530
15311531
# Production configuration (commented out)
15321532
# backend_type: "milvus"
1533-
# backend_config_path: "config/cache/milvus.yaml"
1533+
# backend_config_path: "config/semantic-cache/milvus.yaml"
15341534
# max_entries is ignored for Milvus
15351535
`
15361536
err := os.WriteFile(configFile, []byte(configContent), 0o644)

website/docs/tutorials/semantic-cache/milvus-cache.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ graph TB
4646

4747
### Milvus Backend Configuration
4848

49-
Configure in `config/cache/milvus.yaml`:
49+
Configure in `config/semantic-cache/milvus.yaml`:
5050

5151
```yaml
52-
# config/cache/milvus.yaml
52+
# config/semantic-cache/milvus.yaml
5353
connection:
5454
host: "localhost"
5555
port: 19530
@@ -96,14 +96,14 @@ curl http://localhost:19530/health
9696
Basic Milvus Configuration:
9797

9898
- Set `backend_type: "milvus"` in `config/config.yaml`
99-
- Set `backend_config_path: "config/cache/milvus.yaml"` in `config/config.yaml`
99+
- Set `backend_config_path: "config/semantic-cache/milvus.yaml"` in `config/config.yaml`
100100

101101
```yaml
102102
# config/config.yaml
103103
semantic_cache:
104104
enabled: true
105105
backend_type: "milvus"
106-
backend_config_path: "config/cache/milvus.yaml"
106+
backend_config_path: "config/semantic-cache/milvus.yaml"
107107
similarity_threshold: 0.8
108108
ttl_seconds: 7200
109109
```

0 commit comments

Comments
 (0)