refactor: 更新proto及客户端导入路径,调整Docker构建配置
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: wechatopenai/weknora-app:latest
|
image: wechatopenai/weknora-app:latest
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: docker/Dockerfile.app
|
||||||
container_name: WeKnora-app
|
container_name: WeKnora-app
|
||||||
ports:
|
ports:
|
||||||
- "${APP_PORT:-8080}:8080"
|
- "${APP_PORT:-8080}:8080"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/Tencent/WeKnora/services/docreader/src/proto"
|
"github.com/Tencent/WeKnora/docreader/proto"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/credentials/insecure"
|
"google.golang.org/grpc/credentials/insecure"
|
||||||
"google.golang.org/grpc/resolver"
|
"google.golang.org/grpc/resolver"
|
||||||
@@ -16,10 +16,8 @@ const (
|
|||||||
maxMessageSize = 50 * 1024 * 1024 // 50MB
|
maxMessageSize = 50 * 1024 * 1024 // 50MB
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
// Logger is the default logger used by the client
|
||||||
// Logger is the default logger used by the client
|
var Logger = log.New(os.Stdout, "[DocReader] ", log.LstdFlags|log.Lmicroseconds)
|
||||||
Logger = log.New(os.Stdout, "[DocReader] ", log.LstdFlags|log.Lmicroseconds)
|
|
||||||
)
|
|
||||||
|
|
||||||
// ImageInfo 表示一个图片的信息
|
// ImageInfo 表示一个图片的信息
|
||||||
type ImageInfo struct {
|
type ImageInfo struct {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/Tencent/WeKnora/services/docreader/src/proto"
|
"github.com/Tencent/WeKnora/docreader/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/Tencent/WeKnora/docreader/client"
|
||||||
|
"github.com/Tencent/WeKnora/docreader/proto"
|
||||||
"github.com/Tencent/WeKnora/internal/application/service/retriever"
|
"github.com/Tencent/WeKnora/internal/application/service/retriever"
|
||||||
"github.com/Tencent/WeKnora/internal/config"
|
"github.com/Tencent/WeKnora/internal/config"
|
||||||
werrors "github.com/Tencent/WeKnora/internal/errors"
|
werrors "github.com/Tencent/WeKnora/internal/errors"
|
||||||
@@ -26,8 +28,6 @@ import (
|
|||||||
"github.com/Tencent/WeKnora/internal/types"
|
"github.com/Tencent/WeKnora/internal/types"
|
||||||
"github.com/Tencent/WeKnora/internal/types/interfaces"
|
"github.com/Tencent/WeKnora/internal/types/interfaces"
|
||||||
secutils "github.com/Tencent/WeKnora/internal/utils"
|
secutils "github.com/Tencent/WeKnora/internal/utils"
|
||||||
"github.com/Tencent/WeKnora/services/docreader/src/client"
|
|
||||||
"github.com/Tencent/WeKnora/services/docreader/src/proto"
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/hibiken/asynq"
|
"github.com/hibiken/asynq"
|
||||||
"go.opentelemetry.io/otel/attribute"
|
"go.opentelemetry.io/otel/attribute"
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import (
|
|||||||
"gorm.io/driver/postgres"
|
"gorm.io/driver/postgres"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
|
"github.com/Tencent/WeKnora/docreader/client"
|
||||||
"github.com/Tencent/WeKnora/internal/application/repository"
|
"github.com/Tencent/WeKnora/internal/application/repository"
|
||||||
elasticsearchRepoV7 "github.com/Tencent/WeKnora/internal/application/repository/retriever/elasticsearch/v7"
|
elasticsearchRepoV7 "github.com/Tencent/WeKnora/internal/application/repository/retriever/elasticsearch/v7"
|
||||||
elasticsearchRepoV8 "github.com/Tencent/WeKnora/internal/application/repository/retriever/elasticsearch/v8"
|
elasticsearchRepoV8 "github.com/Tencent/WeKnora/internal/application/repository/retriever/elasticsearch/v8"
|
||||||
@@ -39,7 +40,6 @@ import (
|
|||||||
"github.com/Tencent/WeKnora/internal/tracing"
|
"github.com/Tencent/WeKnora/internal/tracing"
|
||||||
"github.com/Tencent/WeKnora/internal/types"
|
"github.com/Tencent/WeKnora/internal/types"
|
||||||
"github.com/Tencent/WeKnora/internal/types/interfaces"
|
"github.com/Tencent/WeKnora/internal/types/interfaces"
|
||||||
"github.com/Tencent/WeKnora/services/docreader/src/client"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// BuildContainer constructs the dependency injection container
|
// BuildContainer constructs the dependency injection container
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/Tencent/WeKnora/docreader/client"
|
||||||
|
"github.com/Tencent/WeKnora/docreader/proto"
|
||||||
chatpipline "github.com/Tencent/WeKnora/internal/application/service/chat_pipline"
|
chatpipline "github.com/Tencent/WeKnora/internal/application/service/chat_pipline"
|
||||||
"github.com/Tencent/WeKnora/internal/config"
|
"github.com/Tencent/WeKnora/internal/config"
|
||||||
"github.com/Tencent/WeKnora/internal/errors"
|
"github.com/Tencent/WeKnora/internal/errors"
|
||||||
@@ -23,8 +25,6 @@ import (
|
|||||||
"github.com/Tencent/WeKnora/internal/models/utils/ollama"
|
"github.com/Tencent/WeKnora/internal/models/utils/ollama"
|
||||||
"github.com/Tencent/WeKnora/internal/types"
|
"github.com/Tencent/WeKnora/internal/types"
|
||||||
"github.com/Tencent/WeKnora/internal/types/interfaces"
|
"github.com/Tencent/WeKnora/internal/types/interfaces"
|
||||||
"github.com/Tencent/WeKnora/services/docreader/src/client"
|
|
||||||
"github.com/Tencent/WeKnora/services/docreader/src/proto"
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/ollama/ollama/api"
|
"github.com/ollama/ollama/api"
|
||||||
|
|||||||
Reference in New Issue
Block a user