Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AI Agent output after execution is empty i #11223

Open
takefy-dev opened this issue Oct 11, 2024 · 9 comments
Open

AI Agent output after execution is empty i #11223

takefy-dev opened this issue Oct 11, 2024 · 9 comments
Labels
in linear Issue or PR has been created in Linear for internal review Released

Comments

@takefy-dev
Copy link

Bug Description

When an ai call tool sometimes the final output is empty and it cause redis to fail saving the conversation data so the ai just do wrong thing
image
image
image

To Reproduce

Create an ai agent put him a tool with redis store and it will happens when you try to trigger the tool but it does not happens everytim tho

Expected behavior

To output something so it saves the tool execution and continue the flow

Operating System

Linux

n8n Version

1.62.3

Node.js Version

22

Database

PostgreSQL

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented Oct 11, 2024

Hey @takefy-dev,

We have created an internal ticket to look into this which we will be tracking as "GHC-308"

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label Oct 11, 2024
@Joffcom
Copy link
Member

Joffcom commented Oct 11, 2024

Hey @takefy-dev,

Are you able to share a minimal workflow and data set that reproduces this issue?

@takefy-dev
Copy link
Author

create a flow with antropic claude 3.5 put chat input + redis memory + a http tool that makes a request and return response: "a string" make a long prompt and try sometimes it will output this error...

@takefy-dev
Copy link
Author

any news it so anoying?

@takefy-dev
Copy link
Author

#11300 ok this issue is a tempory fix but the wierd thing is ai not generating an ouput while when i test the exact same msg in the playground it output always a msg. Test 5 time in n8n no output, test 5 time in playground always success. The only difference in n8n it has trigger a tool so may be. So what it will output if output string is empty also it will save??

@takefy-dev
Copy link
Author

Yeah i confirm it's fully bug i just used v 1.64.1 and now it save the conversation of the human input but since not output is provided it never save the ai output so we have error like this:
A conversation must alternate between user and assistant roles. Make sure the conversation alternates between user and assistant roles and try again.

Why only in n8n the llm after a tool call is outputing nothing

@takefy-dev
Copy link
Author

@Joffcom

@janober
Copy link
Member

janober commented Oct 24, 2024

Fix got released with [email protected]

@takefy-dev
Copy link
Author

takefy-dev commented Oct 24, 2024

Fix got released with [email protected]

image
Now getting this with aws bedrock...
It's because the output of the last llm execution output is empty...
image
Then when you tried to chat after the issue:
this because in the store the last key is a user role and not assistant...
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review Released
Projects
None yet
Development

No branches or pull requests

3 participants