Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions backend/domain/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,14 @@ func (m *Model) ToModelkitModel() (*modelkitDomain.ModelMetadata, error) {
modelType := modelkitConsts.ParseModelType(string(m.Type))

return &modelkitDomain.ModelMetadata{
Provider: provider,
ModelName: m.Model,
APIKey: m.APIKey,
BaseURL: m.BaseURL,
APIVersion: m.APIVersion,
APIHeader: m.APIHeader,
ModelType: modelType,
Provider: provider,
ModelName: m.Model,
APIKey: m.APIKey,
BaseURL: m.BaseURL,
APIVersion: m.APIVersion,
APIHeader: m.APIHeader,
ModelType: modelType,
Temperature: m.Parameters.Temperature,
}, nil
}

Expand Down Expand Up @@ -98,12 +99,13 @@ type CheckModelReq struct {
}

type ModelParam struct {
ContextWindow int `json:"context_window"`
MaxTokens int `json:"max_tokens"`
R1Enabled bool `json:"r1_enabled"`
SupportComputerUse bool `json:"support_computer_use"`
SupportImages bool `json:"support_images"`
SupportPromptCache bool `json:"support_prompt_cache"`
ContextWindow int `json:"context_window"`
MaxTokens int `json:"max_tokens"`
R1Enabled bool `json:"r1_enabled"`
SupportComputerUse bool `json:"support_computer_use"`
SupportImages bool `json:"support_images"`
SupportPromptCache bool `json:"support_prompt_cache"`
Temperature *float32 `json:"temperature"`
}

// Value implements the driver.Valuer interface for GORM
Expand Down
2 changes: 1 addition & 1 deletion backend/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/alibabacloud-go/tea-utils/v2 v2.0.7
github.com/boj/redistore v1.4.1
github.com/bwmarrin/discordgo v0.29.0
github.com/chaitin/ModelKit/v2 v2.3.1
github.com/chaitin/ModelKit/v2 v2.4.0
github.com/chaitin/pandawiki/sdk/rag v0.0.0-20250923030122-cfce04d5505f
github.com/cloudwego/eino v0.4.7
github.com/cloudwego/eino-ext/components/model/deepseek v0.0.0-20250522060253-ddb617598b09
Expand Down
4 changes: 2 additions & 2 deletions backend/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEex
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chaitin/ModelKit/v2 v2.3.1 h1:AAOsmOqm3/GSteS2dJq9jkCdmZPEIy8AT8KqutGklXM=
github.com/chaitin/ModelKit/v2 v2.3.1/go.mod h1:ArjD6QyI3u9L01mphKoO/6saIxpRJLEgQxXTK5vt57A=
github.com/chaitin/ModelKit/v2 v2.4.0 h1:DGRUA4XUpi9C0Y7RpEiw9+h8nmlnDweuhY9PsBuQcts=
github.com/chaitin/ModelKit/v2 v2.4.0/go.mod h1:O5jsT8XqM19FWftIjhuLYsqNNPuvHjjX9ADB3flZn7w=
github.com/chaitin/pandawiki/sdk/rag v0.0.0-20250923030122-cfce04d5505f h1:vlYTfgfTgBzNRn34d3bFu0dkJAu3h5FNgdv1TqAoosQ=
github.com/chaitin/pandawiki/sdk/rag v0.0.0-20250923030122-cfce04d5505f/go.mod h1:c9cq9DFEaqynk1avg8CSOhZZOClQI1LmhCo8v7NAN3w=
github.com/chyroc/lark v0.0.113 h1:sIW5lTCzx8DUietWfX0XTuh6BgosVT34n5HUED9pk38=
Expand Down