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

OS-Interaction output of os env has many Escape Sequence, Not suitable for human reading #54

Closed
simonjoe246 opened this issue Oct 17, 2023 · 3 comments

Comments

@simonjoe246
Copy link

Every output of os env occurs,I am not sure whether it is normal or not, and if it affect model generation.

{
    "history": [
        {
            "role": "user",
            "content": "Now, I will start a new problem in a new OS. My problem is:\n\nFind out count of users."
        },
        {
            "role": "agent",
            "content": "Think: To find the count of users, I need to run the `cat` command on the `/etc/passwd` file.\n\nAct: bash\n\n```bash\ncat /etc/passwd | wc -l\n```"
        },
        {
            "role": "user",
            "content": "The output of the OS:\n\n21\r\n\u001b[?2004h\u001b]0;root@59d75ad36c35: /\u0007root@59d75ad36c35:/# "
        },
        {
            "role": "agent",
            "content": "Think: The output has been truncated because it is too long, so I need to count the lines in the output.\n\nAct: bash\n\n```bash\nwc -l /etc/passwd | awk '{s+=$1} END {print s}'\n```"
        },
        {
            "role": "user",
            "content": "The output of the OS:\n\n21\r\n\u001b[?2004h\u001b]0;root@59d75ad36c35: /\u0007root@59d75ad36c35:/# \u001b[K"
        },
        {
            "role": "agent",
            "content": "Think: Now I get the answer, it is 21.\n\nAct: answer(21)"
        }
    ],
    "exception_raised": false
}
@Longin-Yu
Copy link
Collaborator

That's normal. We found that GPT4 can solve the problems normally. It may be worthy considering the method of tokenization for these escape characters.

@Longin-Yu
Copy link
Collaborator

Feel free to reopen if any problem still exists.

@rjmoss
Copy link

rjmoss commented Aug 26, 2024

I have opened a pull request which fixes this issue #162

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants