mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
chore: rename platform to channel
This commit is contained in:
@@ -95,8 +95,8 @@ type gatewayIdentity struct {
|
||||
type agentGatewayRequest struct {
|
||||
Model gatewayModelConfig `json:"model"`
|
||||
ActiveContextTime int `json:"activeContextTime"`
|
||||
Platforms []string `json:"platforms"`
|
||||
CurrentPlatform string `json:"currentPlatform"`
|
||||
Channels []string `json:"channels"`
|
||||
CurrentChannel string `json:"currentChannel"`
|
||||
AllowedActions []string `json:"allowedActions,omitempty"`
|
||||
Messages []GatewayMessage `json:"messages"`
|
||||
Skills []string `json:"skills"`
|
||||
@@ -177,8 +177,8 @@ func (r *Resolver) Chat(ctx context.Context, req ChatRequest) (ChatResponse, err
|
||||
BaseURL: provider.BaseUrl,
|
||||
},
|
||||
ActiveContextTime: normalizeMaxContextLoad(maxContextLoadTime),
|
||||
Platforms: req.Platforms,
|
||||
CurrentPlatform: req.CurrentPlatform,
|
||||
Channels: req.Channels,
|
||||
CurrentChannel: req.CurrentChannel,
|
||||
AllowedActions: req.AllowedActions,
|
||||
Messages: messages,
|
||||
Skills: skills,
|
||||
@@ -191,7 +191,7 @@ func (r *Resolver) Chat(ctx context.Context, req ChatRequest) (ChatResponse, err
|
||||
ContactName: defaultString(req.ContactName, "User"),
|
||||
ContactAlias: req.ContactAlias,
|
||||
UserID: req.UserID,
|
||||
CurrentPlatform: req.CurrentPlatform,
|
||||
CurrentPlatform: req.CurrentChannel,
|
||||
ReplyTarget: req.ReplyTarget,
|
||||
SessionToken: req.SessionToken,
|
||||
},
|
||||
@@ -381,8 +381,8 @@ func (r *Resolver) StreamChat(ctx context.Context, req ChatRequest) (<-chan Stre
|
||||
BaseURL: provider.BaseUrl,
|
||||
},
|
||||
ActiveContextTime: normalizeMaxContextLoad(maxContextLoadTime),
|
||||
Platforms: req.Platforms,
|
||||
CurrentPlatform: req.CurrentPlatform,
|
||||
Channels: req.Channels,
|
||||
CurrentChannel: req.CurrentChannel,
|
||||
AllowedActions: req.AllowedActions,
|
||||
Messages: messages,
|
||||
Skills: skills,
|
||||
@@ -395,7 +395,7 @@ func (r *Resolver) StreamChat(ctx context.Context, req ChatRequest) (<-chan Stre
|
||||
ContactName: defaultString(req.ContactName, "User"),
|
||||
ContactAlias: req.ContactAlias,
|
||||
UserID: req.UserID,
|
||||
CurrentPlatform: req.CurrentPlatform,
|
||||
CurrentPlatform: req.CurrentChannel,
|
||||
ReplyTarget: req.ReplyTarget,
|
||||
SessionToken: req.SessionToken,
|
||||
},
|
||||
|
||||
@@ -25,8 +25,8 @@ type ChatRequest struct {
|
||||
Provider string `json:"provider,omitempty"`
|
||||
MaxContextLoadTime int `json:"max_context_load_time,omitempty"`
|
||||
Language string `json:"language,omitempty"`
|
||||
Platforms []string `json:"platforms,omitempty"`
|
||||
CurrentPlatform string `json:"current_platform,omitempty"`
|
||||
Channels []string `json:"channels,omitempty"`
|
||||
CurrentChannel string `json:"current_channel,omitempty"`
|
||||
Messages []GatewayMessage `json:"messages,omitempty"`
|
||||
Skills []string `json:"skills,omitempty"`
|
||||
AllowedActions []string `json:"allowed_actions,omitempty"`
|
||||
|
||||
@@ -140,8 +140,8 @@ func (p *ChannelInboundProcessor) HandleInbound(ctx context.Context, cfg channel
|
||||
ReplyTarget: strings.TrimSpace(msg.ReplyTarget),
|
||||
SessionToken: sessionToken,
|
||||
Query: text,
|
||||
CurrentPlatform: msg.Channel.String(),
|
||||
Platforms: []string{msg.Channel.String()},
|
||||
CurrentChannel: msg.Channel.String(),
|
||||
Channels: []string{msg.Channel.String()},
|
||||
})
|
||||
if err != nil {
|
||||
if p.logger != nil {
|
||||
|
||||
Reference in New Issue
Block a user