mirror of
https://github.com/Warky-Devs/vecna.git
synced 2026-05-05 01:26:58 +00:00
feat(adapter): add passthrough adapter for unchanged vectors
This commit is contained in:
@@ -95,6 +95,9 @@ func openWriter(path string) (io.Writer, error) {
|
||||
// buildAdapter constructs the Adapter from the loaded config.
|
||||
func buildAdapter(cfg *config.Config) (adapter.Adapter, error) {
|
||||
ac := cfg.Adapter
|
||||
if ac.SourceDim == 0 && ac.TargetDim == 0 {
|
||||
return adapter.NewPassthrough(), nil
|
||||
}
|
||||
switch ac.Type {
|
||||
case "truncate":
|
||||
tm, pm, err := parseTruncateModes(ac.TruncateMode, ac.PadMode)
|
||||
|
||||
Reference in New Issue
Block a user