legion-llm 0.5.9 → 0.5.10
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: 6cff6f387230b6d2905a8e6a9a375cd99f35b983b932470c62978f1dc6203614
|
|
4
|
+
data.tar.gz: 144ead2b968bfd62687ade350b64082beb6d8192cfcd07171fa6084659196ba9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dcf8fcd4d3f75a6d0d363bc75302d3717fc14c43747c40cd5a05f5787db2041bc7d73506c55e18a310d61f03e271faa8db7e12d0612f712386f781c927a9b888
|
|
7
|
+
data.tar.gz: 5b51860f5255efd71b5bb6d0565cb6b7db9795cd84cc9b23edaf749489966596b801490e9382cc30b5897ade6407c72860ba68e20deef003e66c17c4ae621b2f
|
data/CHANGELOG.md
CHANGED
|
@@ -16,12 +16,13 @@ module Legion
|
|
|
16
16
|
|
|
17
17
|
include Steps::McpDiscovery
|
|
18
18
|
include Steps::ToolCalls
|
|
19
|
+
include Steps::KnowledgeCapture
|
|
19
20
|
|
|
20
21
|
STEPS = %i[
|
|
21
22
|
tracing_init idempotency conversation_uuid context_load
|
|
22
23
|
rbac classification billing gaia_advisory rag_context mcp_discovery
|
|
23
24
|
routing request_normalization provider_call response_normalization
|
|
24
|
-
tool_calls context_store post_response response_return
|
|
25
|
+
tool_calls context_store post_response knowledge_capture response_return
|
|
25
26
|
].freeze
|
|
26
27
|
|
|
27
28
|
PRE_PROVIDER_STEPS = %i[
|
|
@@ -31,7 +32,7 @@ module Legion
|
|
|
31
32
|
].freeze
|
|
32
33
|
|
|
33
34
|
POST_PROVIDER_STEPS = %i[
|
|
34
|
-
response_normalization tool_calls context_store post_response response_return
|
|
35
|
+
response_normalization tool_calls context_store post_response knowledge_capture response_return
|
|
35
36
|
].freeze
|
|
36
37
|
|
|
37
38
|
def initialize(request)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Legion
|
|
4
|
+
module LLM
|
|
5
|
+
module Pipeline
|
|
6
|
+
module Steps
|
|
7
|
+
module KnowledgeCapture
|
|
8
|
+
def step_knowledge_capture
|
|
9
|
+
return unless defined?(Legion::Extensions::Apollo::Helpers::Writeback)
|
|
10
|
+
|
|
11
|
+
response = current_response
|
|
12
|
+
return unless response
|
|
13
|
+
|
|
14
|
+
Legion::Extensions::Apollo::Helpers::Writeback.evaluate_and_route(
|
|
15
|
+
request: @request,
|
|
16
|
+
response: response,
|
|
17
|
+
enrichments: @enrichments
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
@timeline.record(
|
|
21
|
+
category: :knowledge, key: 'knowledge:capture',
|
|
22
|
+
direction: :outbound, detail: 'evaluated writeback to apollo',
|
|
23
|
+
from: 'pipeline', to: 'apollo'
|
|
24
|
+
)
|
|
25
|
+
rescue StandardError => e
|
|
26
|
+
@warnings << "knowledge_capture error: #{e.message}"
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
data/lib/legion/llm/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: legion-llm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Esity
|
|
@@ -250,6 +250,7 @@ files:
|
|
|
250
250
|
- lib/legion/llm/pipeline/steps/billing.rb
|
|
251
251
|
- lib/legion/llm/pipeline/steps/classification.rb
|
|
252
252
|
- lib/legion/llm/pipeline/steps/gaia_advisory.rb
|
|
253
|
+
- lib/legion/llm/pipeline/steps/knowledge_capture.rb
|
|
253
254
|
- lib/legion/llm/pipeline/steps/mcp_discovery.rb
|
|
254
255
|
- lib/legion/llm/pipeline/steps/metering.rb
|
|
255
256
|
- lib/legion/llm/pipeline/steps/post_response.rb
|