Simplify, no need to add system prompt when asking for reply
This commit is contained in:
@@ -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.Info("Reasoning, ask LLM for a reply", "agent", a.Character.Name)
|
||||||
xlog.Debug("Conversation", "conversation", fmt.Sprintf("%+v", a.currentConversation))
|
xlog.Debug("Conversation", "conversation", fmt.Sprintf("%+v", a.currentConversation))
|
||||||
msg, err := a.askLLM(ctx, append(a.currentConversation, openai.ChatCompletionMessage{
|
msg, err := a.askLLM(ctx, a.currentConversation)
|
||||||
Role: "system",
|
|
||||||
Content: "The assistant needs to reply without using any tool.",
|
|
||||||
}))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
job.Result.Finish(err)
|
job.Result.Finish(err)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ func (a *GenImageAction) Run(ctx context.Context, params action.ActionParams) (s
|
|||||||
return "Failed to generate image", nil
|
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 {
|
func (a *GenImageAction) Definition() action.ActionDefinition {
|
||||||
|
|||||||
Reference in New Issue
Block a user