Skip to content

Commit a36ceeb

Browse files
committed
Ensure prefix cache plugin implements all preprae data plugin methods
1 parent 00abc87 commit a36ceeb

File tree

1 file changed

+8
-0
lines changed
  • pkg/epp/scheduling/framework/plugins/multi/prefix

1 file changed

+8
-0
lines changed

pkg/epp/scheduling/framework/plugins/multi/prefix/plugin.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,14 @@ func (p *Plugin) WithName(name string) *Plugin {
208208
return p
209209
}
210210

211+
func (p *Plugin) Produces() map[string]any {
212+
return map[string]any{dplugins.PrefixCacheMatchPrecentKey: dplugins.PrefixCacheMatchPercent{}}
213+
}
214+
215+
func (p *Plugin) Consumes() map[string]any {
216+
return map[string]any{}
217+
}
218+
211219
func (p *Plugin) PrepareRequestData(ctx context.Context, request *types.LLMRequest, pods []types.Pod) error {
212220
// pre score step, hashing prompt and find longest prefix match.
213221
hashes := hashPrompt(ctx, request, getBlockSize(pods, p.config), p.config.MaxPrefixBlocksToMatch)

0 commit comments

Comments
 (0)