style: correct format by goimports (#2289)
This commit is contained in:
@ -183,9 +183,9 @@ func parseChatflowParameters(ctx context.Context, ar *run.ChatV3Request) (map[st
|
||||
if err := json.Unmarshal([]byte(*ar.Parameters), ¶meters); err != nil {
|
||||
return nil, errors.New("parameters field should be an object, not a string")
|
||||
}
|
||||
return parameters,nil
|
||||
return parameters, nil
|
||||
}
|
||||
return parameters,nil
|
||||
return parameters, nil
|
||||
}
|
||||
|
||||
func (a *OpenapiAgentRunApplication) buildTools(ctx context.Context, shortcmd *run.ShortcutCommandDetail) ([]*entity.Tool, error) {
|
||||
|
||||
@ -58,10 +58,10 @@ func (c *impl) buildSingleAgentStreamExecuteReq(ctx context.Context, agentRuntim
|
||||
) *model.ExecuteRequest {
|
||||
|
||||
return &model.ExecuteRequest{
|
||||
Identity: c.buildIdentity(agentRuntime),
|
||||
Input: agentRuntime.Input,
|
||||
History: agentRuntime.HistoryMsg,
|
||||
UserID: agentRuntime.UserID,
|
||||
Identity: c.buildIdentity(agentRuntime),
|
||||
Input: agentRuntime.Input,
|
||||
History: agentRuntime.HistoryMsg,
|
||||
UserID: agentRuntime.UserID,
|
||||
CustomVariables: agentRuntime.CustomVariables,
|
||||
PreCallTools: slices.Transform(agentRuntime.PreRetrieveTools, func(tool *agentrun.Tool) *agentrun.ToolsRetriever {
|
||||
return &agentrun.ToolsRetriever{
|
||||
|
||||
@ -43,8 +43,7 @@ type Config struct {
|
||||
ModelFactory chatmodel.Factory
|
||||
CPStore compose.CheckPointStore
|
||||
|
||||
CustomVariables map[string]string
|
||||
|
||||
CustomVariables map[string]string
|
||||
|
||||
ConversationID int64
|
||||
}
|
||||
@ -75,7 +74,7 @@ func BuildAgent(ctx context.Context, conf *Config) (r *AgentRunner, err error) {
|
||||
return nil, err
|
||||
}
|
||||
if conf.CustomVariables != nil {
|
||||
for k,v := range conf.CustomVariables {
|
||||
for k, v := range conf.CustomVariables {
|
||||
avs[k] = v
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,11 +82,11 @@ func (art *AgentRuntime) ChatflowRun(ctx context.Context, imagex imagex.ImageX)
|
||||
"USER_INPUT": concatWfInput(art),
|
||||
}
|
||||
if art.GetRunMeta().ChatflowParameters != nil {
|
||||
for k,v := range art.GetRunMeta().ChatflowParameters {
|
||||
for k, v := range art.GetRunMeta().ChatflowParameters {
|
||||
chatInput[k] = v
|
||||
}
|
||||
}
|
||||
wfStreamer, err = crossworkflow.DefaultSVC().StreamExecute(ctx, executeConfig, chatInput)
|
||||
wfStreamer, err = crossworkflow.DefaultSVC().StreamExecute(ctx, executeConfig, chatInput)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user