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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ require (
github.com/cloudwego/eino-ext/components/model/openai v0.0.0-20250710065240-482d48888f25
github.com/google/generative-ai-go v0.20.1
github.com/google/uuid v1.6.0
github.com/labstack/echo/v4 v4.13.4
github.com/ollama/ollama v0.6.5
github.com/yuin/goldmark v1.7.11
google.golang.org/api v0.239.0
Expand Down Expand Up @@ -57,7 +58,6 @@ require (
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/labstack/echo/v4 v4.13.4 // indirect
github.com/labstack/gommon v0.4.2 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/mailru/easyjson v0.9.0 // indirect
Expand Down
5 changes: 4 additions & 1 deletion test/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,8 @@ func main() {

NewModelKit(echo, nil, false)

echo.Start(":8080")
err := echo.Start(":8080")
if err != nil {
fmt.Println("err:", err)
}
}
2 changes: 1 addition & 1 deletion ui/ModelModal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yokowu/modelkit-ui",
"version": "0.5.0",
"version": "0.5.1",
"description": "A reusable AI model configuration modal component for React applications",
"private": false,
"type": "module",
Expand Down
20 changes: 15 additions & 5 deletions ui/ModelModal/src/ModelModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,22 @@ export const ModelModal: React.FC<ModelModalProps> = ({
<Stack gap={1}>
{Object.values(providers)
.filter((it) => {
// 当model_type为chat或llm时显示所有供应商
if (model_type === 'chat' || model_type === 'llm' || model_type === 'code' || model_type === 'coder') {
return true;
// 根据model_type和provider配置决定是否显示
switch (model_type) {
case 'chat':
case 'llm':
return it.chat;
case 'code':
case 'coder':
return it.code;
case 'embedding':
return it.embedding;
case 'rerank':
case 'reranker':
return it.rerank;
default:
return it.label === 'BaiZhiCloud' || it.label === 'Other';
}
// 其他情况只显示百智云和其它
return it.label === 'BaiZhiCloud' || it.label === 'Other';
})
.map((it) => (
<Stack
Expand Down
Loading