docker compose

This commit is contained in:
1iaan
2026-04-04 16:30:54 +08:00
parent c1a895258f
commit e993eb6c5c
25 changed files with 241 additions and 95 deletions

View File

@@ -4,8 +4,9 @@ import (
predis "ai-chat-service/pkg/db/redis"
"context"
"encoding/json"
"github.com/redis/go-redis/v9"
"time"
"github.com/redis/go-redis/v9"
)
type redisCache struct {

View File

@@ -15,13 +15,14 @@ import (
"ai-chat-service/proto"
"flag"
"fmt"
"net/http"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/collectors"
"github.com/prometheus/client_golang/prometheus/promhttp"
"google.golang.org/grpc"
"google.golang.org/grpc/health"
"google.golang.org/grpc/health/grpc_health_v1"
"net/http"
"net"
)

View File

@@ -11,9 +11,10 @@ import (
keywords_proto "ai-chat-service/services/keywords-filter/proto"
"ai-chat-service/services/tokenizer"
"context"
"time"
"github.com/google/uuid"
"github.com/sashabaranov/go-openai"
"time"
)
const ChatPrimedTokens = 2

View File

@@ -11,13 +11,14 @@ import (
"ai-chat-service/services/tokenizer"
"context"
"encoding/json"
"github.com/golang/protobuf/jsonpb"
"github.com/google/uuid"
"github.com/sashabaranov/go-openai"
"io"
"strconv"
"strings"
"time"
"github.com/golang/protobuf/jsonpb"
"github.com/google/uuid"
"github.com/sashabaranov/go-openai"
)
type chatService struct {