Skip to content

Commit

Permalink
v0.11.7 解决 Tools 与 Cache 的兼容性问题
Browse files Browse the repository at this point in the history
  • Loading branch information
x5iu committed Sep 12, 2024
1 parent 4eeb2cc commit 9c13cc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func init() {
var (
MoonPalace = &cobra.Command{
Use: "moonpalace",
Version: "v0.11.6",
Version: "v0.11.7",
Short: "MoonPalace is a command-line tool for debugging the Moonshot AI HTTP API",
SilenceErrors: true,
SilenceUsage: true,
Expand Down
3 changes: 2 additions & 1 deletion proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"math"
"net/http"
"os/signal"
"slices"
"strconv"
"strings"
"sync"
Expand Down Expand Up @@ -479,7 +480,7 @@ func buildProxy(
rawMessages := gjson.GetBytes(requestBody, "messages").String()
cache = &Cache{
Messages: json.RawMessage(rawMessages),
Tools: requestObject.Tools,
Tools: slices.Clone(requestObject.Tools),
TTL: cacheTTL,
}
if err = caching.Create(r.Context(), key, cache); err == nil {
Expand Down

0 comments on commit 9c13cc9

Please sign in to comment.