浏览代码

removed redundant strings.CutPrefix from Decode

Arne Müller 1 年之前
父节点
当前提交
ce6197a8e0
共有 1 个文件被更改,包括 0 次插入3 次删除
  1. 0 3
      llm/llama.go

+ 0 - 3
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)
 		return "", fmt.Errorf("unmarshal encode response: %w", err)
 	}
 	}
 
 
-	// decoded content contains a leading whitespace
-	decoded.Content, _ = strings.CutPrefix(decoded.Content, "")
-
 	return decoded.Content, nil
 	return decoded.Content, nil
 }
 }