GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor(gateway): use llm pipeline for policy evaluation · majorcontext/keep@3569261

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • internal/gateway
    • config
      • config.go
    • proxy.go
    • proxy_test.go
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎internal/gateway/config/config.go‎

Copy file name to clipboardExpand all lines: internal/gateway/config/config.go
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"gopkg.in/yaml.v3"
88

99
keepconfig "github.com/majorcontext/keep/internal/config"
10+
"github.com/majorcontext/keep/llm"
1011
)
1112

1213
// GatewayConfig holds the top-level gateway configuration.
@@ -31,6 +32,17 @@ type DecomposeConfig struct {
3132
ResponseSummary *bool `yaml:"response_summary,omitempty"`
3233
}
3334

35+
// ToLLM converts a gateway DecomposeConfig to the public llm.DecomposeConfig.
36+
func (d DecomposeConfig) ToLLM() llm.DecomposeConfig {
37+
return llm.DecomposeConfig{
38+
ToolResult: d.ToolResult,
39+
ToolUse: d.ToolUse,
40+
Text: d.Text,
41+
RequestSummary: d.RequestSummary,
42+
ResponseSummary: d.ResponseSummary,
43+
}
44+
}
45+
3446
// ToolResultEnabled returns whether tool_result decomposition is enabled (default: true).
3547
func (d DecomposeConfig) ToolResultEnabled() bool { return d.ToolResult == nil || *d.ToolResult }
3648

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.