Skip to content

Commit e2cf431

Browse files
committed
avoid potential slice modification for optionsSets
1 parent dc38334 commit e2cf431

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

sydney/sydney.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package sydney
33
import (
44
"github.com/samber/lo"
55
"log/slog"
6+
"slices"
67
"strconv"
78
"sydneyqt/util"
89

@@ -75,10 +76,10 @@ func NewSydney(options Options) *Sydney {
7576
"https://edgeservices.bing.com/edgesvc/turing/conversation/create", options.CreateConversationURL),
7677
bypassServer: options.BypassServer,
7778
optionsSetMap: map[string][]string{
78-
"Balanced": append(basicOptionsSet, "galileo", "gldcl1p"),
79-
"Precise": append(basicOptionsSet, "h3precise"),
80-
"Creative": basicOptionsSet,
81-
"CreativeClassic": basicOptionsSet,
79+
"Balanced": append(slices.Clone(basicOptionsSet), "galileo", "gldcl1p"),
80+
"Precise": append(slices.Clone(basicOptionsSet), "h3precise"),
81+
"Creative": slices.Clone(basicOptionsSet),
82+
"CreativeClassic": slices.Clone(basicOptionsSet),
8283
},
8384
sliceIDs: []string{},
8485
locationHints: map[string][]LocationHint{

0 commit comments

Comments
 (0)