L6 Agents - Not working

the math question or the wikipedia question had below outputs,

Finished chain.
{‘input’: ‘What is the 25% of 300?’,
‘output’: ‘Agent stopped due to iteration limit or time limit.’}

Observation: Invalid or incomplete response
Thought:

Finished chain.

Not sure, this is because of OpenAI Api problem or something to do with langchain. My understanding Langchain is working as a library not an online API.

1 Like

Were you able to figure this out? I’m running into the same issue with this part of the Agents lesson. It seems to not be able to access the Calculator or Wikipedia tools.

When using it with the Calculator, this is what happens:

Then when using it with Wikipedia, this happens:

Interestingly in the next exercise, I was able to sort the names, but it doesn’t seem to be doing the Observation – it’s blank.

Not sure if this sheds any light on things - but hopefully we’ll figure this out.

I tried replacing AgentType.CHAT_ZERO_SHOT_REACT_DESCRIPTION with AgentType.ZERO_SHOT_REACT_DESCRIPTION, and it seemed to work.

18 Likes

:tada: It worked! Thank you @flian2 !

The Python Agent also seems to not be sorting the names properly. The response I’m getting is:

“[[‘Jen’, ‘Ayai’], [‘Harrison’, ‘Chase’], [‘Lang’, ‘Chain’], [‘Elle’, ‘Elem’], [‘Geoff’, ‘Fusion’], [‘Trance’, ‘Former’], [‘Dolly’, ‘Too’]]”

“chain” should be before “chase” and
“former” should be before “fusion”

Is anyone else seeing this?

1 Like

Couldn’t verify as calls to OpenAI got blocked with this message , RateLimitError: exceeded quota for this month.
I will try later running the notebooks from local system with the setup and let you know on my observation.
Thanks for the answer.

you are correct , in the video around 8 20 mins, it shows response with chase and fusion in the positions as you mentioned. Sorry couldn’t check from my side as i couldn’t get the notebook running. Did you change anything with respect to the query ?

Works Perfectly. Thanks

It worked perfectly ! thank you

This solution also worked for me.

This can be the other solution.

change the code from
llm = ChatOpenAI(temperature=0)
to
llm = ChatOpenAI(temperature=0, model='gpt-3.5-turbo-0301')

2 Likes

It works. Thank you.

It works as well. Thank you!

I had also a problem with this code. Your solution worked for me. Thanks.

I got the same order with ‘Chase’ before ‘Chain’ when I ran it earlier today.

3 Likes

This helps solve the problem with [‘Harrison’, ‘Chase’] appearing before the [‘Lang’, ‘Chain’].

Yes I have the same result when I run the code in the Notebook. I tried prompting to only sort by last name and the result is the same. And ‘Fusion’ should come after ‘Former’ right? So anyone knows why the result is wrong?

Yes, thank you!

Where did you get this ? Any documentation?

This also worked for me! Funny, I swear the original code worked for me two weeks ago…

Thanks for sharing your fix