Simplify, no need to add system prompt when asking for reply

This commit is contained in:
mudler
2025-03-01 16:17:27 +01:00
parent 3790ad3666
commit a75feaab4e
2 changed files with 2 additions and 5 deletions

View File

@@ -667,10 +667,7 @@ func (a *Agent) consumeJob(job *Job, role string) {
xlog.Info("Reasoning, ask LLM for a reply", "agent", a.Character.Name)
xlog.Debug("Conversation", "conversation", fmt.Sprintf("%+v", a.currentConversation))
msg, err := a.askLLM(ctx, append(a.currentConversation, openai.ChatCompletionMessage{
Role: "system",
Content: "The assistant needs to reply without using any tool.",
}))
msg, err := a.askLLM(ctx, a.currentConversation)
if err != nil {
job.Result.Finish(err)
return

View File

@@ -63,7 +63,7 @@ func (a *GenImageAction) Run(ctx context.Context, params action.ActionParams) (s
return "Failed to generate image", nil
}
return resp.Data[0].URL, nil
return fmt.Sprintf("The image was generated and available at: %s", resp.Data[0].URL), nil
}
func (a *GenImageAction) Definition() action.ActionDefinition {