Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
AI

Developer Builds a ChatGPT Client for MS-DOS (yeokhengmeng.com) 54

"With the recent attention on ChatGPT and OpenAI's release of their APIs, many developers have developed clients for modern platforms to talk to this super smart AI chatbot," writes maker/retro coding enthusiast yeokm1 . "However I'm pretty sure almost nobody has written one for a vintage platform like MS-DOS."

They share a blog post with all the details — including footage of their client ultimately running on a vintage IBM PC from 1984 (with a black and orange monitor and those big, boxy keys). "3.5 years ago, I wrote a Slack client to run on Windows 3.1," the blog post explains. "I thought to try something different this time and develop for an even older platform as a challenge."

One challenge was just finding a networking API for DOS. But everything came together, with the ChatGPT-for-DOS app written using Visual Studio Code text editor (testing on a virtual machine running DOS 6.22), parsing the JSON output from OpenAI's Chat Completion API. "And before you ask, I did not use ChatGPT for help to code this app in any way," the blog post concludes. But after the app was working, he used it to ask ChatGPT how one would build such an app — and ChatGPT erroneously suggested breezily that he just try accessing OpenAI's Python API from the DOS command line.

"What is the AI smoking...?"
This discussion has been archived. No new comments can be posted.

Developer Builds a ChatGPT Client for MS-DOS

Comments Filter:
  • not to piss on anyone's hobby project, but isn't there already a MS DOS web browser such as Arachne that can do it?

    • OK, I didn't read the link before commenting (I'm a pipelined CPU so I do branch prediction). Of course with prediction comes misprediction. Anyway that looks like a text mode interface to the chatGPT API not a graphical UI. Still .. the gist of my comment stands but on shakier grounds. It doesn't seem like a challenge but I guess there is some retro-novelty to the idea?

      • Re: (Score:3, Insightful)

        It doesn't seem like a challenge but I guess there is some retro-novelty to the idea?

        Young coder having fun coding for old hardware. Nothing spectacular but a good story. Also who owns an IBM 5155 Portable PC?(extra points for being far younger than the PC)

      • I guess the web version of chatGPT requires javascript, which Arachne does not support.

  • by goombah99 ( 560566 ) on Sunday March 26, 2023 @01:49PM (#63400765)

    "ChatGPT emulate a dos prompt please"

    Now run a chatGPT API in this dos environment.

    Next up, playing doom

  • *Yawn* Boring... (Score:4, Interesting)

    by Rosco P. Coltrane ( 209368 ) on Sunday March 26, 2023 @01:50PM (#63400771)

    This is a ChatGPT cloud *CLIENT* running in DOS. It doesn't do anything at all. The only technological "challenge" was to get enough TCP/IP going in DOS to pass on requests to the cloud API and get the text responses back.

    Is this what passes for technological achievement these days? Wake me up when they get it working locally without any networking.

    • by Anonymous Coward

      "I am salty because I did not think of doing something like this until I read that someone else made the attempt."

      • Hmm no. This is more or less equivalent to implementing a terminal emulator in DOS. I haven't thought of doing something like this because it's not terribly interesting.

  • That is the problem with the way these models work, the model can cobble together a sentence but it cannot really understand the meaning of the output. The model only knows that it picked the most appropriate words according to its training, coherent or useful or not.

    • In one of his books, Stephen Pinker describes the case of severely intellectually disabled woman who could barely feed herself or tie her shoes, but would produce grammatically correct and mellifluous sentences...with absolute nonsense for content.

      He used it to argue that intelligent speech and intelligence are two distinct things, and any form of the Sapir-Worf hypothesis is demonstrably wrong.

      One infers the general idea holds for chatbots and not just humans.

    • I drank a glass of the strong vodka along with my feeble meat. My curious green ideas slept furiously. Also, where are the wonderfully coined old project names like Protosynthex?
  • Congratulations, they've invented ELIZA [wikipedia.org], and Dr. Sbaitso [wikipedia.org].
    • Scaled it up to pretty much as large as it can be reasonably scaled, and made the backing db lossy to get a lot more scale on top of that.
  • Comment removed based on user account deletion
  • HXDOS is a thing, capable of running simple Win32 programs under DOS. For example, 7-zip (console version) works fine under DOS.

    I haven't tested if Windows Python can run under HXDOS, or if Python can be built with DJGPP for DOS.

    I'm also not sure if HXDOS supports networking at all.

    • I haven't tested if [...] Python can be built with DJGPP for DOS.

      It can, but I believe the latest version offered for download is 2.4.2, and I don't know if there's any way to get networking with it without writing some code in something else

  • I never used ChatGPT, but I think that is awesome great work. Would be nice if FreeDOS put that on their CD :)

  • Development won't be complete until responses are read in Dr Sbaitso's [youtube.com] voice

  • Might as well weld a USB or phone jack onto a Model T
    • by drnb ( 2434720 )

      Might as well weld a USB or phone jack onto a Model T

      Well the Model T is pretty immune to wifi and bluetooth hacks. So it may get you to your destination when a modern car cannot.

      • It would be interesting to see if WiFi and Bluetooth are immune to the full spectrum glory emitted by a Model T ignition coil with vibrator interrupter. I used one of these on a cloud chamber when I was a kid. In addition to giving a variety of nasty shocks, it destroyed most of the radio spectrum that I could receive (500KHz-300MHz).
        • by drnb ( 2434720 )

          It would be interesting to see if WiFi and Bluetooth are immune to the full spectrum glory emitted by a Model T ignition coil with vibrator interrupter. I used one of these on a cloud chamber when I was a kid. In addition to giving a variety of nasty shocks, it destroyed most of the radio spectrum that I could receive (500KHz-300MHz).

          Sounds like a win, built-in hacking countermeasures. :-)

  • by williamyf ( 227051 ) on Sunday March 26, 2023 @03:42PM (#63401041)

    1.) Make the ChatGPT client a TSR. Similar to Borland's Sidekick. That way, if you are doing a document in Wordstar, or a spreadsheet in Lotus 123, or a presentarion in IBM's storyboard, you can punch the key combo and get to the ChatGPT client to aid in your work

    2.) Implement copy paste from the Character Framebuffer (again, like Sidekick did) so you can copy stuff from your programs into chatGPT (and back).

    3.) Implement the TCP/IP stack as NDIS 2.0 or ODI, so that it is more "period Correct"

    4.) See if it is possible, by slightly increasing the HW requirements it is possible to dispense of the HTTP to HTTPS proxy running on a more modern machine. The minimum would be using a math copro + an 80186@ ~10Mhz or a NEC V20 in the OG PC (highly unlikely). Failing that a 286 (this would be the sweet spot), and failing that a 386SX

    Pretty please! With sugar?

    Again, congratulations for a Job Well done. Peace!

    PS: The "Links" FOSS web browser for MS-DOS has a partial implementation of TLS, it can be had here:
    http://links.twibright.com/ [twibright.com]

    Also, a FOSS mail program for FreeDOS, FLMail has partial TLS support:
    https://sourceforge.net/p/free... [sourceforge.net]

    They needs a DOS Extender though, so, the bare minimum would be a 286, as pharlap 286 extender or Rational Software's Dos16m (available in the WACOM Compiuler the author is using) would be available...

    • Thank's for bringing this memory: TSR. Terminate and Stay Resident! Did one in my youth - a dictionary that could have been activated from any aditor - it was fun when you could controlled all ends of the system!

  • Commodore 64 or Commodore 128 computer!
    • by Scoth ( 879800 )

      There is in fact one available [atariage.com] for Atari 8-bits. It would be possible to use the same hardware to write one for C64/128 pretty easily.

    • by vbdasc ( 146051 )

      These commodore things were mere toys. The authors should use an Altair 8800 box with a bunch of S-100 daughterboards, a Z-80 CPU and running CP/M 2.2 , like real men do.

  • Just have the shell directly run commands through a ChatGPT filter, such that you execute any UNIX command and ChatGPT figures out what it needs to do in DOS to make it happen.

  • I think chatgpt can emulate DOS as well!

  • including footage of their client ultimately running on a vintage IBM PC from 1984 (with a black and orange monitor and those big, boxy keys).

    The monitors were black background with green characters. The black and orange monitors didn't come about until the period where "clone" PCs were coming out. My black and orange monitor used a Hercules graphics card, which also gave me better than 640x480(?) pixel resolution.

    • Come to think of it, the phosphors were yellow, not really orange...

    • The orange phosphors were much more pleasant than the green ones, but (IIRC) green phosphors were much cheaper so this is why green screens were much more common.

        Orange gas plasma monochrome monitors were the best back in the 80s but very expensive.

    • by _merlin ( 160982 )

      better than 640x480(?) pixel resolution

      Hercules was 720x348 in pixel-addressable graphics mode, so only better than VGA in one direction, almost fifty thousand fewer total pixels (about 250,000 versus just over 300,000), and pixels not even close to square. (It was 720x350 in text mode using the character generator ROM, but there wasn't enough VRAM for the last two rows in bitmap mode.)

    • The machine he is running on (an IBM Portable PC) *only* came with an amber monitor. Parts of the machine have been changed, but that part is very authentic.

  • They should be using STDOUT with the ability to pipe the output to a file or another program, as well as to be able to accept input directed from files/programs so it can be used with scripting.

      This needs to be the standard for any platform that has a ChatGPT CLI client.

  • Subject says it all

"Being against torture ought to be sort of a multipartisan thing." -- Karl Lehenbauer, as amended by Jeff Daiell, a Libertarian

Working...