Skip to content

Commit 2d215b2

Browse files
authored
fix: 修复go module path 添加v2 (#64)
1 parent 2e1986e commit 2d215b2

File tree

9 files changed

+22
-21
lines changed

9 files changed

+22
-21
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ModelKit 是一个强大的AI模型管理平台,支持多种AI服务提供商
2727

2828
#### 后端依赖
2929
```bash
30-
go get github.com/chaitin/ModelKit
30+
go get github.com/chaitin/ModelKit/v2
3131
go get github.com/labstack/echo/v4
3232
go get github.com/go-playground/validator/v10
3333
```
@@ -56,8 +56,8 @@ package v1
5656

5757
import (
5858
"net/http"
59-
"github.com/chaitin/ModelKit/domain"
60-
"github.com/chaitin/ModelKit/usecase"
59+
"github.com/chaitin/ModelKit/v2/domain"
60+
"github.com/chaitin/ModelKit/v2/usecase"
6161
"github.com/labstack/echo/v4"
6262
)
6363

domain/domain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package domain
22

33
import (
4-
"github.com/chaitin/ModelKit/consts"
4+
"github.com/chaitin/ModelKit/v2/consts"
55
)
66

77
type ModelKit interface {

domain/model.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package domain
22

3-
import "github.com/chaitin/ModelKit/consts"
3+
import "github.com/chaitin/ModelKit/v2/consts"
44

55
type ModelMetadata struct {
66
ModelName string `json:"id"` // 模型的名字
@@ -334,6 +334,7 @@ func getSiliconFlowModels() []ModelMetadata {
334334
{ModelName: "Qwen/Qwen3-Coder-30B-A3B-Instruct", Object: "model", Provider: consts.ModelProviderSiliconFlow, ModelType: consts.ModelTypeCoder},
335335
}
336336
}
337+
337338
// 月之暗面模型
338339
func getMoonshotModels() []ModelMetadata {
339340
return []ModelMetadata{
@@ -417,4 +418,4 @@ func initModels() {
417418
Models = append(Models, getAzureOpenAIModels()...)
418419
Models = append(Models, getZhiPuModels()...)
419420
Models = append(Models, getGeminiModels()...)
420-
}
421+
}

domain/modelprovider.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package domain
22

3-
import "github.com/chaitin/ModelKit/consts"
3+
import "github.com/chaitin/ModelKit/v2/consts"
44

55
type IModelProvider[T any] interface {
66
ListModel(subType string, provider string) ([]T, error)
@@ -293,4 +293,4 @@ func initModelProviders() {
293293
model := Models[i]
294294
TypeModelMap[model.ModelType] = append(TypeModelMap[model.ModelType], model)
295295
}
296-
}
296+
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/chaitin/ModelKit
1+
module github.com/chaitin/ModelKit/v2
22

33
go 1.24.0
44

test/backend/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66

77
"github.com/labstack/echo/v4/middleware"
88

9-
"github.com/chaitin/ModelKit/domain"
10-
"github.com/chaitin/ModelKit/pkg/log"
11-
"github.com/chaitin/ModelKit/usecase"
9+
"github.com/chaitin/ModelKit/v2/domain"
10+
"github.com/chaitin/ModelKit/v2/pkg/log"
11+
"github.com/chaitin/ModelKit/v2/usecase"
1212
"github.com/labstack/echo/v4"
1313
)
1414

usecase/modelkit.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ import (
2727
"google.golang.org/api/option"
2828
"google.golang.org/genai"
2929

30-
"github.com/chaitin/ModelKit/consts"
31-
"github.com/chaitin/ModelKit/domain"
32-
"github.com/chaitin/ModelKit/pkg/request"
33-
"github.com/chaitin/ModelKit/utils"
30+
"github.com/chaitin/ModelKit/v2/consts"
31+
"github.com/chaitin/ModelKit/v2/domain"
32+
"github.com/chaitin/ModelKit/v2/pkg/request"
33+
"github.com/chaitin/ModelKit/v2/utils"
3434
)
3535

3636
func ModelList(ctx context.Context, req *domain.ModelListReq) (*domain.ModelListResp, error) {

usecase/openai.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package usecase
22

33
import (
4-
"github.com/chaitin/ModelKit/consts"
5-
"github.com/chaitin/ModelKit/domain"
4+
"github.com/chaitin/ModelKit/v2/consts"
5+
"github.com/chaitin/ModelKit/v2/domain"
66
)
77

88
type OpenAI struct{}

utils/utils.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ import (
1818
"github.com/JohannesKaufmann/html-to-markdown/v2/converter"
1919
"github.com/JohannesKaufmann/html-to-markdown/v2/plugin/base"
2020
"github.com/JohannesKaufmann/html-to-markdown/v2/plugin/commonmark"
21-
"github.com/chaitin/ModelKit/consts"
22-
"github.com/chaitin/ModelKit/domain"
23-
"github.com/chaitin/ModelKit/pkg/request"
21+
"github.com/chaitin/ModelKit/v2/consts"
22+
"github.com/chaitin/ModelKit/v2/domain"
23+
"github.com/chaitin/ModelKit/v2/pkg/request"
2424
"github.com/yuin/goldmark"
2525
"github.com/yuin/goldmark/ast"
2626
"github.com/yuin/goldmark/renderer/html"

0 commit comments

Comments
 (0)