Skip to content

Commit

Permalink
feat: able to configure public namespace for gpts and add IsRecommend…
Browse files Browse the repository at this point in the history
…ed label to gpt

Signed-off-by: bjwswang <bjwswang@gmail.com>
  • Loading branch information
bjwswang committed Mar 28, 2024
1 parent b658b24 commit 4fbc668
Show file tree
Hide file tree
Showing 19 changed files with 329 additions and 126 deletions.
3 changes: 3 additions & 0 deletions api/base/v1alpha1/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ const (
// AppPublicLabelKey will add to app which is public
AppPublicLabelKey = Group + "/app-is-public"

// AppRecommendedLabelKey will add to app which is recommended
AppRecommendedLabelKey = Group + "/app-is-recommended"

DefaultChatTimeoutSeconds = 60
)

Expand Down
2 changes: 2 additions & 0 deletions api/base/v1alpha1/application_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ type ApplicationSpec struct {
Icon string `json:"icon,omitempty"`
// IsPublic Set whether the current application provides services to the public
IsPublic bool `json:"isPublic,omitempty"`
// IsRecommended Set whether the current application is recognized as recommended to users
IsRecommended bool `json:"isRecommended,omitempty"`
// WebConfig is the configuration for web interface
WebConfig `json:",inline"`
// prologue, show in the chat top
Expand Down
148 changes: 146 additions & 2 deletions apiserver/graph/generated/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions apiserver/graph/generated/models_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions apiserver/graph/schema/application.gql
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ mutation createApplication($input:CreateApplicationMetadataInput!){
creationTimestamp
updateTimestamp
isPublic
isRecommended
status
category
}
Expand All @@ -34,6 +35,7 @@ mutation updateApplication($input: UpdateApplicationMetadataInput!){
creationTimestamp
updateTimestamp
isPublic
isRecommended
status
category
}
Expand Down Expand Up @@ -61,6 +63,7 @@ mutation updateApplicationConfig($input: UpdateApplicationConfigInput!){
creationTimestamp
updateTimestamp
isPublic
isRecommended
status
category
}
Expand Down Expand Up @@ -111,6 +114,7 @@ query getApplication($name: String!, $namespace: String!){
creationTimestamp
updateTimestamp
isPublic
isRecommended
status
category
}
Expand Down Expand Up @@ -166,6 +170,7 @@ query listApplications($input: ListCommonInput!) {
creationTimestamp
updateTimestamp
isPublic
isRecommended
status
category
}
Expand Down
Loading

0 comments on commit 4fbc668

Please sign in to comment.