chore(plugin): remove unuse config field (#2265)
This commit is contained in:
@ -149,18 +149,18 @@ func (a *OpenapiAgentRunApplication) buildAgentRunRequest(ctx context.Context, a
|
|||||||
}
|
}
|
||||||
displayContent := a.buildDisplayContent(ctx, ar)
|
displayContent := a.buildDisplayContent(ctx, ar)
|
||||||
arm := &entity.AgentRunMeta{
|
arm := &entity.AgentRunMeta{
|
||||||
ConversationID: ptr.From(ar.ConversationID),
|
ConversationID: ptr.From(ar.ConversationID),
|
||||||
AgentID: ar.BotID,
|
AgentID: ar.BotID,
|
||||||
Content: multiContent,
|
Content: multiContent,
|
||||||
DisplayContent: displayContent,
|
DisplayContent: displayContent,
|
||||||
SpaceID: spaceID,
|
SpaceID: spaceID,
|
||||||
UserID: ar.User,
|
UserID: ar.User,
|
||||||
SectionID: conversationData.SectionID,
|
SectionID: conversationData.SectionID,
|
||||||
PreRetrieveTools: shortcutCMDData,
|
PreRetrieveTools: shortcutCMDData,
|
||||||
IsDraft: false,
|
IsDraft: false,
|
||||||
ConnectorID: connectorID,
|
ConnectorID: connectorID,
|
||||||
ContentType: contentType,
|
ContentType: contentType,
|
||||||
Ext: func() map[string]string {
|
Ext: func() map[string]string {
|
||||||
if ar.ExtraParams == nil {
|
if ar.ExtraParams == nil {
|
||||||
return map[string]string{}
|
return map[string]string{}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
- plugin_id: 2
|
- plugin_id: 2
|
||||||
product_id: 7376228190244618278
|
|
||||||
deprecated: false
|
deprecated: false
|
||||||
version: v1.0.0
|
version: v1.0.0
|
||||||
openapi_doc_file: library_search.yaml
|
openapi_doc_file: library_search.yaml
|
||||||
@ -30,7 +29,6 @@
|
|||||||
method: get
|
method: get
|
||||||
sub_url: /document/coze
|
sub_url: /document/coze
|
||||||
- plugin_id: 3
|
- plugin_id: 3
|
||||||
product_id: 7496002227321143350
|
|
||||||
deprecated: false
|
deprecated: false
|
||||||
version: v1.0.0
|
version: v1.0.0
|
||||||
openapi_doc_file: bocha_search.yaml
|
openapi_doc_file: bocha_search.yaml
|
||||||
@ -63,7 +61,6 @@
|
|||||||
method: post
|
method: post
|
||||||
sub_url: /v1/web-search
|
sub_url: /v1/web-search
|
||||||
- plugin_id: 4
|
- plugin_id: 4
|
||||||
product_id: 7328314516272463923
|
|
||||||
deprecated: false
|
deprecated: false
|
||||||
version: v1.0.0
|
version: v1.0.0
|
||||||
openapi_doc_file: wolfram_alpha.yaml
|
openapi_doc_file: wolfram_alpha.yaml
|
||||||
@ -98,7 +95,6 @@
|
|||||||
method: get
|
method: get
|
||||||
sub_url: /v2/query
|
sub_url: /v2/query
|
||||||
- plugin_id: 5
|
- plugin_id: 5
|
||||||
product_id: 7351267469065011241
|
|
||||||
deprecated: false
|
deprecated: false
|
||||||
version: v1.0.0
|
version: v1.0.0
|
||||||
openapi_doc_file: maker_smart_design.yaml
|
openapi_doc_file: maker_smart_design.yaml
|
||||||
@ -127,7 +123,6 @@
|
|||||||
method: get
|
method: get
|
||||||
sub_url: /coze
|
sub_url: /coze
|
||||||
- plugin_id: 6
|
- plugin_id: 6
|
||||||
product_id: 7343894357063385100
|
|
||||||
deprecated: false
|
deprecated: false
|
||||||
version: v1.0.0
|
version: v1.0.0
|
||||||
openapi_doc_file: sohu_hot_news.yaml
|
openapi_doc_file: sohu_hot_news.yaml
|
||||||
@ -156,7 +151,6 @@
|
|||||||
method: get
|
method: get
|
||||||
sub_url: /blog/outer/temp/feeds/ark
|
sub_url: /blog/outer/temp/feeds/ark
|
||||||
- plugin_id: 9
|
- plugin_id: 9
|
||||||
product_id: 7461926057290153993
|
|
||||||
deprecated: false
|
deprecated: false
|
||||||
version: v1.0.0
|
version: v1.0.0
|
||||||
openapi_doc_file: image_compression.yaml
|
openapi_doc_file: image_compression.yaml
|
||||||
@ -182,7 +176,6 @@
|
|||||||
method: post
|
method: post
|
||||||
sub_url: /img2base64/img2base64
|
sub_url: /img2base64/img2base64
|
||||||
- plugin_id: 10
|
- plugin_id: 10
|
||||||
product_id: 7355060468744044595
|
|
||||||
deprecated: false
|
deprecated: false
|
||||||
version: v1.0.0
|
version: v1.0.0
|
||||||
openapi_doc_file: worth_buying.yaml
|
openapi_doc_file: worth_buying.yaml
|
||||||
@ -215,7 +208,6 @@
|
|||||||
method: get
|
method: get
|
||||||
sub_url: /query
|
sub_url: /query
|
||||||
- plugin_id: 11
|
- plugin_id: 11
|
||||||
product_id: 7358789295274049572
|
|
||||||
deprecated: false
|
deprecated: false
|
||||||
version: v1.0.0
|
version: v1.0.0
|
||||||
openapi_doc_file: chestnut_sign.yaml
|
openapi_doc_file: chestnut_sign.yaml
|
||||||
@ -244,7 +236,6 @@
|
|||||||
method: post
|
method: post
|
||||||
sub_url: /generate_tasks
|
sub_url: /generate_tasks
|
||||||
- plugin_id: 12
|
- plugin_id: 12
|
||||||
product_id: 7407722060627247143
|
|
||||||
deprecated: false
|
deprecated: false
|
||||||
version: v1.0.0
|
version: v1.0.0
|
||||||
openapi_doc_file: sky_eye_check.yaml
|
openapi_doc_file: sky_eye_check.yaml
|
||||||
@ -293,7 +284,6 @@
|
|||||||
method: get
|
method: get
|
||||||
sub_url: /search/2.0
|
sub_url: /search/2.0
|
||||||
- plugin_id: 14
|
- plugin_id: 14
|
||||||
product_id: 7395041877151514662
|
|
||||||
deprecated: false
|
deprecated: false
|
||||||
version: v1.0.0
|
version: v1.0.0
|
||||||
openapi_doc_file: lark_authentication_authorization.yaml
|
openapi_doc_file: lark_authentication_authorization.yaml
|
||||||
@ -322,7 +312,6 @@
|
|||||||
method: post
|
method: post
|
||||||
sub_url: /access_token/get_tenant_access_token
|
sub_url: /access_token/get_tenant_access_token
|
||||||
- plugin_id: 15
|
- plugin_id: 15
|
||||||
product_id: 7395041302766944275
|
|
||||||
deprecated: false
|
deprecated: false
|
||||||
version: v1.0.0
|
version: v1.0.0
|
||||||
openapi_doc_file: lark_message.yaml
|
openapi_doc_file: lark_message.yaml
|
||||||
@ -384,7 +373,6 @@
|
|||||||
method: post
|
method: post
|
||||||
sub_url: /message/send_webhook_message
|
sub_url: /message/send_webhook_message
|
||||||
- plugin_id: 16
|
- plugin_id: 16
|
||||||
product_id: 7395043460165779483
|
|
||||||
deprecated: false
|
deprecated: false
|
||||||
version: v1.0.0
|
version: v1.0.0
|
||||||
openapi_doc_file: lark_base.yaml
|
openapi_doc_file: lark_base.yaml
|
||||||
@ -506,7 +494,6 @@
|
|||||||
method: post
|
method: post
|
||||||
sub_url: /base/update_records
|
sub_url: /base/update_records
|
||||||
- plugin_id: 17
|
- plugin_id: 17
|
||||||
product_id: 7395040352337559578
|
|
||||||
deprecated: false
|
deprecated: false
|
||||||
version: v1.0.0
|
version: v1.0.0
|
||||||
openapi_doc_file: lark_sheet.yaml
|
openapi_doc_file: lark_sheet.yaml
|
||||||
@ -606,7 +593,6 @@
|
|||||||
method: post
|
method: post
|
||||||
sub_url: /spreadsheet/search_spreadsheet
|
sub_url: /spreadsheet/search_spreadsheet
|
||||||
- plugin_id: 18
|
- plugin_id: 18
|
||||||
product_id: 7395041172152156186
|
|
||||||
deprecated: false
|
deprecated: false
|
||||||
version: v1.0.0
|
version: v1.0.0
|
||||||
openapi_doc_file: lark_task.yaml
|
openapi_doc_file: lark_task.yaml
|
||||||
@ -666,7 +652,6 @@
|
|||||||
method: patch
|
method: patch
|
||||||
sub_url: /task/update_task
|
sub_url: /task/update_task
|
||||||
- plugin_id: 19
|
- plugin_id: 19
|
||||||
product_id: 7395041536909574154
|
|
||||||
deprecated: false
|
deprecated: false
|
||||||
version: v1.0.0
|
version: v1.0.0
|
||||||
openapi_doc_file: lark_docx.yaml
|
openapi_doc_file: lark_docx.yaml
|
||||||
@ -760,7 +745,6 @@
|
|||||||
method: post
|
method: post
|
||||||
sub_url: /drive/upload_media
|
sub_url: /drive/upload_media
|
||||||
- plugin_id: 20
|
- plugin_id: 20
|
||||||
product_id: 7408195262340104230
|
|
||||||
deprecated: false
|
deprecated: false
|
||||||
version: v1.0.0
|
version: v1.0.0
|
||||||
openapi_doc_file: lark_wiki.yaml
|
openapi_doc_file: lark_wiki.yaml
|
||||||
@ -792,7 +776,6 @@
|
|||||||
method: post
|
method: post
|
||||||
sub_url: /wiki/search_wiki
|
sub_url: /wiki/search_wiki
|
||||||
- plugin_id: 21
|
- plugin_id: 21
|
||||||
product_id: 7395041856574423075
|
|
||||||
deprecated: false
|
deprecated: false
|
||||||
version: v1.0.0
|
version: v1.0.0
|
||||||
openapi_doc_file: lark_calendar.yaml
|
openapi_doc_file: lark_calendar.yaml
|
||||||
@ -844,7 +827,6 @@
|
|||||||
method: patch
|
method: patch
|
||||||
sub_url: /calendar/update_event/{event_id}
|
sub_url: /calendar/update_event/{event_id}
|
||||||
- plugin_id: 22
|
- plugin_id: 22
|
||||||
product_id: 7379953949534715956
|
|
||||||
deprecated: false
|
deprecated: false
|
||||||
version: v1.0.0
|
version: v1.0.0
|
||||||
openapi_doc_file: gaode_map.yaml
|
openapi_doc_file: gaode_map.yaml
|
||||||
|
|||||||
@ -39,7 +39,6 @@ import (
|
|||||||
|
|
||||||
type pluginProductMeta struct {
|
type pluginProductMeta struct {
|
||||||
PluginID int64 `yaml:"plugin_id" validate:"required"`
|
PluginID int64 `yaml:"plugin_id" validate:"required"`
|
||||||
ProductID int64 `yaml:"product_id" validate:"required"`
|
|
||||||
Deprecated bool `yaml:"deprecated"`
|
Deprecated bool `yaml:"deprecated"`
|
||||||
Version string `yaml:"version" validate:"required"`
|
Version string `yaml:"version" validate:"required"`
|
||||||
PluginType common.PluginType `yaml:"plugin_type" validate:"required"`
|
PluginType common.PluginType `yaml:"plugin_type" validate:"required"`
|
||||||
@ -178,14 +177,13 @@ func loadPluginProductMeta(ctx context.Context, basePath string) (err error) {
|
|||||||
|
|
||||||
pi := &PluginInfo{
|
pi := &PluginInfo{
|
||||||
Info: &model.PluginInfo{
|
Info: &model.PluginInfo{
|
||||||
ID: m.PluginID,
|
ID: m.PluginID,
|
||||||
RefProductID: &m.ProductID,
|
PluginType: m.PluginType,
|
||||||
PluginType: m.PluginType,
|
Version: ptr.Of(m.Version),
|
||||||
Version: ptr.Of(m.Version),
|
IconURI: ptr.Of(m.Manifest.LogoURL),
|
||||||
IconURI: ptr.Of(m.Manifest.LogoURL),
|
ServerURL: ptr.Of(doc.Servers[0].URL),
|
||||||
ServerURL: ptr.Of(doc.Servers[0].URL),
|
Manifest: m.Manifest,
|
||||||
Manifest: m.Manifest,
|
OpenapiDoc: doc,
|
||||||
OpenapiDoc: doc,
|
|
||||||
},
|
},
|
||||||
ToolIDs: make([]int64, 0, len(m.Tools)),
|
ToolIDs: make([]int64, 0, len(m.Tools)),
|
||||||
}
|
}
|
||||||
@ -271,10 +269,7 @@ func checkPluginMetaInfo(ctx context.Context, m *pluginProductMeta) (continued b
|
|||||||
logs.CtxErrorf(ctx, "invalid plugin id '%d'", m.PluginID)
|
logs.CtxErrorf(ctx, "invalid plugin id '%d'", m.PluginID)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if m.ProductID <= 0 {
|
|
||||||
logs.CtxErrorf(ctx, "invalid product id '%d'", m.ProductID)
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
_, ok := toolProducts[m.PluginID]
|
_, ok := toolProducts[m.PluginID]
|
||||||
if ok {
|
if ok {
|
||||||
logs.CtxErrorf(ctx, "duplicate plugin id '%d'", m.PluginID)
|
logs.CtxErrorf(ctx, "duplicate plugin id '%d'", m.PluginID)
|
||||||
|
|||||||
Reference in New Issue
Block a user