redis缓存替换+pgvector向量替换
This commit is contained in:
11
ai-chat-backend/services/services.go
Normal file
11
ai-chat-backend/services/services.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package services
|
||||
|
||||
import (
|
||||
"context"
|
||||
"google.golang.org/grpc/metadata"
|
||||
)
|
||||
|
||||
func AppendBearerTokenToContext(ctx context.Context, accessToken string) context.Context {
|
||||
md := metadata.Pairs("Authorization", "Bearer "+accessToken)
|
||||
return metadata.NewOutgoingContext(ctx, md)
|
||||
}
|
||||
Reference in New Issue
Block a user