AIlice icon indicating copy to clipboard operation
AIlice copied to clipboard

references to "undefined" in webUI

Open FellowTraveler opened this issue 1 year ago • 6 comments

The agent appears to have assigned labels to various symbols correctly, since it references those symbols by name in the console log. But in the web UI it will refer to those same symbols as "undefined". I would post a screenshot but I assume you know what I mean already.

FellowTraveler avatar Jul 05 '24 16:07 FellowTraveler

I don't quite understand the situation you're describing. I suspect it might be that the UI is having difficulty displaying certain variables, which usually happens when the UI tries to display multimodal variables with extended Markdown syntax. It would be best to have logs for reference.

stevenlu137 avatar Jul 07 '24 03:07 stevenlu137

image image

See these two images? One shows the console log, and one shows the web UI (for the exact same action). Notice the "undefined" values in the web UI.

FellowTraveler avatar Jul 21 '24 15:07 FellowTraveler

I'm sure you already get the point, but I figured I'd upload one more example. This behavior is consistent. Always happens in every case.

image image

Notice the replacement of key strings with "undefined" in the second image from the same event.

FellowTraveler avatar Jul 21 '24 16:07 FellowTraveler

fixed! just an error due to my lack of familiarity with js. You can get the fixed version on latest master branch.

stevenlu137 avatar Jul 22 '24 05:07 stevenlu137

Can I assume therefore that the agent is assigning internal variables to some of these things? Presumably to track their values and standardize their usage? How are those used? Just curious.

FellowTraveler avatar Jul 22 '24 11:07 FellowTraveler

This error was simply caused by me using incorrect js syntax when rendering the codespan.

However, what you're curious about also exists in AIlice: code blocks marked with triple backticks will be automatically defined as variables, allowing agents to quickly reference these codes without needing to copy them. This will become apparent when you let AIlice program and run the code. The coder-proxy usually has the coder write the code, and after the coder returns the code block, the coder-proxy directly references a randomly named variable to execute or save the code. In fact, the system automatically parses the code block returned by the coder and saves it as a randomly named variable.

You can see the related code in core/AConversation.py:18-26.

stevenlu137 avatar Jul 22 '24 12:07 stevenlu137