Stream: beginners

Topic: ✔ REPL mangles string output


view this post on Zulip Ian McLerran (May 14 2024 at 22:25):

Okay, as it turns out, I think this has to do with how the REPL prints strings, not how it parses them.

view this post on Zulip Ian McLerran (May 14 2024 at 22:27):

Simply pasting the following string into the repl will print a mangled string as output:

"\n         \n{\"id\":\"gen-dSzo4A3JWSjm3ynwIjVn8gMrcOe1\",\"model\":\"mistralai/mixtral-8x7b-instruct\",\"object\":\"chat.completion\",\"created\":1715710439,\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"Hello! I'm here to help. What's your question today? I'll do my best to provide a concise and friendly answer.\"},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":51,\"completion_tokens\":27,\"total_tokens\":78}}"

view this post on Zulip Brendan Hansknecht (May 15 2024 at 06:29):

Oh....this bug....yep

view this post on Zulip Brendan Hansknecht (May 15 2024 at 06:31):

I think we need to change the repl to use inspect to generate what it prints

view this post on Zulip Brendan Hansknecht (May 15 2024 at 06:33):

Currently, it uses a special mem map thing and it probably has a bug

view this post on Zulip Richard Feldman (May 15 2024 at 07:26):

yeah its output is older than Inspect :sweat_smile:

view this post on Zulip Ian McLerran (May 15 2024 at 17:56):

Okay, I filed an issue for this.

view this post on Zulip Notification Bot (May 15 2024 at 17:56):

Ian McLerran has marked this topic as resolved.


Last updated: Jul 06 2025 at 12:14 UTC