lex-agentic-social 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e7c9279bedede69a220b1beab53826fcc730ce652a399f56b3c525dd1ad1bff9
|
|
4
|
+
data.tar.gz: f37c06453a43c45a11adad8567852d80d35cfe56bddd40b6a837a23ed396cc6b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2b8a707d9fc9dd4578d7129296c775abcd487649acb70f00876b7465e7f303a81cd3291b625951dbff7c6802e359279908f81ee23139a4e56a413f794366cea3
|
|
7
|
+
data.tar.gz: eeed5f4c8e0b987a557c066554c5a7ab3840515dc1740356e9f29ccf300711c396cbf480d0802d651640251b2e0b35599b5e8dd8210e8bdaeabd6f4430da633b
|
data/CHANGELOG.md
CHANGED
|
@@ -136,8 +136,10 @@ module Legion
|
|
|
136
136
|
def retrieve_from_apollo_local
|
|
137
137
|
return [] unless defined?(Legion::Apollo::Local) && Legion::Apollo::Local.started?
|
|
138
138
|
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
result = Legion::Apollo::Local.query_by_tags(tags: ['partner_interaction'], limit: 50)
|
|
140
|
+
return [] unless result[:success] && result[:results].is_a?(Array)
|
|
141
|
+
|
|
142
|
+
result[:results].map { |e| { content: e[:content], tags: e[:tags], confidence: e[:confidence] } }
|
|
141
143
|
rescue StandardError => e
|
|
142
144
|
Legion::Logging.warn("[calibration] retrieve_from_apollo_local error: #{e.message}")
|
|
143
145
|
[]
|
|
@@ -90,13 +90,15 @@ RSpec.describe Legion::Extensions::Agentic::Social::Calibration::Runners::Calibr
|
|
|
90
90
|
stub_const('Legion::Apollo', Module.new)
|
|
91
91
|
stub_const('Legion::Apollo::Local', mock_local)
|
|
92
92
|
allow(mock_local).to receive(:started?).and_return(true)
|
|
93
|
-
allow(mock_local).to receive(:query_by_tags).with(tags: ['partner_interaction'], limit: 50).and_return(
|
|
94
|
-
|
|
93
|
+
allow(mock_local).to receive(:query_by_tags).with(tags: ['partner_interaction'], limit: 50).and_return({
|
|
94
|
+
success: true,
|
|
95
|
+
results: [{
|
|
95
96
|
content: 'hello partner',
|
|
96
97
|
tags: ['partner_interaction'],
|
|
97
98
|
confidence: 0.8
|
|
98
|
-
}
|
|
99
|
-
|
|
99
|
+
}],
|
|
100
|
+
count: 1
|
|
101
|
+
})
|
|
100
102
|
|
|
101
103
|
result = client.send(:retrieve_from_apollo_local)
|
|
102
104
|
expect(result).to be_an(Array)
|