feat: switch to OpenRouter for web search integration

This commit is contained in:
Yiyang Kang 2025-09-19 15:11:45 +09:00
parent 07d2042eb7
commit 7fd8146ec5
7 changed files with 33 additions and 29 deletions

View file

@ -5,7 +5,7 @@ import (
"fmt"
"git.gensokyo.cafe/kkyy/tgbot_misaka_5882f7/utils"
"github.com/dgraph-io/ristretto"
"github.com/dgraph-io/ristretto/v2"
"github.com/eko/gocache/lib/v4/cache"
gocache_lib "github.com/eko/gocache/lib/v4/store"
ristretto_store "github.com/eko/gocache/store/ristretto/v4"
@ -19,7 +19,7 @@ var (
)
func initMsgCache() error {
ristrettoCache, err := ristretto.NewCache(&ristretto.Config{
ristrettoCache, err := ristretto.NewCache(&ristretto.Config[string, tele.Message]{
NumCounters: 100_000,
MaxCost: 20 << 20, // 20 MiB
BufferItems: 64,