Skip to content

Commit

Permalink
Merge pull request kubeagi#467 from Lanture1064/dev
Browse files Browse the repository at this point in the history
chore: refactor update/delete llm&embedder func
  • Loading branch information
bjwswang authored Dec 29, 2023
2 parents 3ed0634 + 7e6c39e commit 257ad5e
Show file tree
Hide file tree
Showing 10 changed files with 412 additions and 62 deletions.
158 changes: 151 additions & 7 deletions apiserver/graph/generated/generated.go

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

33 changes: 29 additions & 4 deletions apiserver/graph/generated/models_gen.go

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

10 changes: 1 addition & 9 deletions apiserver/graph/impl/embedder.resolvers.go

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

2 changes: 1 addition & 1 deletion apiserver/graph/impl/modelservice.resolvers.go

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

13 changes: 11 additions & 2 deletions apiserver/graph/schema/embedder.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ input CreateEmbedderInput {
}

input UpdateEmbedderInput {
"""模型服务资源名称(不可同名)"""
"""待修改模型服务资源名称(必填)"""
name: String!
"""模型服务创建命名空间"""
"""待修改模型服务创建命名空间(必填)"""
namespace: String!

"""模型服务资源标签"""
Expand All @@ -71,6 +71,15 @@ input UpdateEmbedderInput {
displayName: String
"""模型服务资源描述"""
description: String

"""模型服务访问信息"""
endpointinput: EndpointInput

"""
向量化模型服务接口类型
规则: 目前支持 zhipuai,openai两种接口类型
"""
type: String
}

type EmbedderQuery {
Expand Down
27 changes: 26 additions & 1 deletion apiserver/graph/schema/llm.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,31 @@ input CreateLLMInput {
type: String
}

input UpdateLLMInput {
"""待修改模型服务资源名称(必填)"""
name: String!
"""待修改模型服务创建命名空间(必填)"""
namespace: String!
"""模型服务资源标签"""
labels: Map
"""模型服务资源注释"""
annotations: Map
"""模型服务资源展示名称作为显示,并提供编辑"""
displayName: String

"""模型服务资源描述"""
description: String

"""模型服务访问信息"""
endpointinput: EndpointInput

"""
模型服务接口类型
规则: 目前支持 zhipuai,openai两种接口类型
"""
type: String
}

type LLMQuery {
getLLM(name: String!, namespace: String!): LLM!
listLLMs(input: ListCommonInput!): PaginatedResult!
Expand All @@ -64,4 +89,4 @@ type LLMQuery {
# query
extend type Query{
LLM: LLMQuery
}
}
Loading

0 comments on commit 257ad5e

Please sign in to comment.