From ce6197a8e00cb8bc44d4fd1eb89d1b2d439ebf75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20M=C3=BCller?= Date: Wed, 18 Oct 2023 22:47:20 +0200 Subject: [PATCH] removed redundant strings.CutPrefix from Decode --- llm/llama.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/llm/llama.go b/llm/llama.go index bd5c3bb7..a51ae86e 100644 --- a/llm/llama.go +++ b/llm/llama.go @@ -668,9 +668,6 @@ func (llm *llama) Decode(ctx context.Context, tokens []int) (string, error) { return "", fmt.Errorf("unmarshal encode response: %w", err) } - // decoded content contains a leading whitespace - decoded.Content, _ = strings.CutPrefix(decoded.Content, "") - return decoded.Content, nil }