Skip to content

Commit 1fd2de5

Browse files
committed
refactor: 更新proto及客户端导入路径,调整Docker构建配置
1 parent c1f731e commit 1fd2de5

File tree

6 files changed

+12
-11
lines changed

6 files changed

+12
-11
lines changed

docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
services:
22
app:
33
image: wechatopenai/weknora-app:latest
4+
build:
5+
context: .
6+
dockerfile: docker/Dockerfile.app
47
container_name: WeKnora-app
58
ports:
69
- "${APP_PORT:-8080}:8080"

docreader/client/client.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"os"
77
"time"
88

9-
"github.com/Tencent/WeKnora/services/docreader/src/proto"
9+
"github.com/Tencent/WeKnora/docreader/proto"
1010
"google.golang.org/grpc"
1111
"google.golang.org/grpc/credentials/insecure"
1212
"google.golang.org/grpc/resolver"
@@ -16,10 +16,8 @@ const (
1616
maxMessageSize = 50 * 1024 * 1024 // 50MB
1717
)
1818

19-
var (
20-
// Logger is the default logger used by the client
21-
Logger = log.New(os.Stdout, "[DocReader] ", log.LstdFlags|log.Lmicroseconds)
22-
)
19+
// Logger is the default logger used by the client
20+
var Logger = log.New(os.Stdout, "[DocReader] ", log.LstdFlags|log.Lmicroseconds)
2321

2422
// ImageInfo 表示一个图片的信息
2523
type ImageInfo struct {

docreader/client/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"testing"
88
"time"
99

10-
"github.com/Tencent/WeKnora/services/docreader/src/proto"
10+
"github.com/Tencent/WeKnora/docreader/proto"
1111
)
1212

1313
func init() {

internal/application/service/knowledge.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import (
1616
"strings"
1717
"time"
1818

19+
"github.com/Tencent/WeKnora/docreader/client"
20+
"github.com/Tencent/WeKnora/docreader/proto"
1921
"github.com/Tencent/WeKnora/internal/application/service/retriever"
2022
"github.com/Tencent/WeKnora/internal/config"
2123
werrors "github.com/Tencent/WeKnora/internal/errors"
@@ -26,8 +28,6 @@ import (
2628
"github.com/Tencent/WeKnora/internal/types"
2729
"github.com/Tencent/WeKnora/internal/types/interfaces"
2830
secutils "github.com/Tencent/WeKnora/internal/utils"
29-
"github.com/Tencent/WeKnora/services/docreader/src/client"
30-
"github.com/Tencent/WeKnora/services/docreader/src/proto"
3131
"github.com/google/uuid"
3232
"github.com/hibiken/asynq"
3333
"go.opentelemetry.io/otel/attribute"

internal/container/container.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"gorm.io/driver/postgres"
2121
"gorm.io/gorm"
2222

23+
"github.com/Tencent/WeKnora/docreader/client"
2324
"github.com/Tencent/WeKnora/internal/application/repository"
2425
elasticsearchRepoV7 "github.com/Tencent/WeKnora/internal/application/repository/retriever/elasticsearch/v7"
2526
elasticsearchRepoV8 "github.com/Tencent/WeKnora/internal/application/repository/retriever/elasticsearch/v8"
@@ -39,7 +40,6 @@ import (
3940
"github.com/Tencent/WeKnora/internal/tracing"
4041
"github.com/Tencent/WeKnora/internal/types"
4142
"github.com/Tencent/WeKnora/internal/types/interfaces"
42-
"github.com/Tencent/WeKnora/services/docreader/src/client"
4343
)
4444

4545
// BuildContainer constructs the dependency injection container

internal/handler/initialization.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import (
1313
"sync"
1414
"time"
1515

16+
"github.com/Tencent/WeKnora/docreader/client"
17+
"github.com/Tencent/WeKnora/docreader/proto"
1618
chatpipline "github.com/Tencent/WeKnora/internal/application/service/chat_pipline"
1719
"github.com/Tencent/WeKnora/internal/config"
1820
"github.com/Tencent/WeKnora/internal/errors"
@@ -23,8 +25,6 @@ import (
2325
"github.com/Tencent/WeKnora/internal/models/utils/ollama"
2426
"github.com/Tencent/WeKnora/internal/types"
2527
"github.com/Tencent/WeKnora/internal/types/interfaces"
26-
"github.com/Tencent/WeKnora/services/docreader/src/client"
27-
"github.com/Tencent/WeKnora/services/docreader/src/proto"
2828
"github.com/gin-gonic/gin"
2929
"github.com/google/uuid"
3030
"github.com/ollama/ollama/api"

0 commit comments

Comments
 (0)