5 ms·
Show HN: TRS-GPT – ChatGPT client/server for the TRS-80
Hi there HN community. I'm excited to show my personal project -- an open-source code and hardware approach that connects my 1980's TRS-80 Model III computer to an OpenAI server. The TRS-80 can hold a chat session with OpenAI, and it's all very retro feeling. There were challenges along the way, as the approach to interfacing between ancient hardware and modern software interface wasn't immediately available. Please see https://github.com/druid77/trs-gpt https://github.com/druid77/trs-gpt for all the details, and let me know if you have any ideas for improvements. For example, adding support for voice.
- deleted 3y ago[deleted]
- yawnxyz 3y agoVery cool! Would it even be possible to get llama.cpp running on this thing??
- Bluecobra 3y agoThe I/O module seems like overkill to me. It probably would be heck of a lot easier to turn a TRS 80 into a dumb terminal and just use serial connectivity to a Linux box.
- deleted 3y ago[deleted]
- xchip 3y agothat is what it really is, a serial terminal.
- druid77 3y agoTh I/O module (TRS-IO) is just providing a way for a BASIC programs to send and receive network requests over the serial port. So yes, I’m actually taking the dumb terminal approach. I’m running a python server on a Linux box (AWS EC2) that handles the request then constructs an OpenAI call from there, then passes the response back to the TRS-80.
- Bluecobra 3y agoAh I see. So basically instead of a local Linux box you are piping it to an AWS instance with that card. This was what I was alluding to, in where you are just displaying the shell from the connected Linux host so you don't need to write any software on the TRS-80 itself: https://arstechnica.com/information-technology/2015/08/surfing-the-internet-from-my-trs-80-model-100/ https://arstechnica.com/information-technology/2015/08/surfi...
- starkparker 3y agoOn the wargames front, a modern TRS-80 speech synthesis module replacement: https://hackaday.com/2022/07/29/hackaday-prize-2022-modern-plug-in-gives-trs-80-its-voice-back/ https://hackaday.com/2022/07/29/hackaday-prize-2022-modern-p...
- deleted 3y ago[deleted]
- bcjordan 3y agoCould you have it write code and run it on the machine too?
- druid77 3y agoThat would be a really cool addition. GPT seems less good at writing BASIC code, than other modern languages though. I think since GPT mostly crawls online sources there was less training material put online overall. :)
- ilaksh 3y agoWith 3.5-turbo-16k you could include quite a lot of example code or extra BASIC documentation if you are concise. Targeting some retro platform for ChatGPT code generation is something I have been thinking about. Especially now that we have fine tuning. Because the domain of a retro system is relatively limited compared to the scope of modern platforms. Maybe someone could train it with like 300 type-in BASIC programs along with a good paragraph-long description for each. Then we could just give it a paragraph describing what we want and if we are lucky get a tailor-made program.
- codazoda 3y agoI was experimenting with this just last week. The TRS-80 CoCo was my first computer and I still have one. A year or two ago I was able to read and write data to a modern digital audio recorder. I think a program could be built to write the audio file that the TRS-80 would understand. Then you could translate a code file to audio and LOAD it. I wrote such a program with the help of ChatGPT last week but the wav file didn’t quite sound right. After more research, I think it might be right and I just don’t remember the sound quite right. This post made me think you might be able to go the other way too. I vaguely remember a command to forward the audio cassette (maybe in seconds). The host computer could listen for that forwarding command and respond with its translated wav. Forward 5 seconds could be for API call #5. This would require no extra hardware on the TRS-80 side. You would just connect the audio jacks into a sound card headphone/mic port. Edit: As another commenter posted, serial would probably be much easier. I didn’t even realize it had serial IO.
- bitwize 3y agoIt's almost SepTandy... good way to kick the month off.
- designium 3y agoThat's cool!
- replwoacause 3y agoAwesome project! Good job
- graton 3y agoSince the TRS-80 Model I was my first computer and the Model III was my second computer I do keep having a nostalgic desire to get a Model III or 4 to use. Reading these articles and seeing various YouTube videos about them may one day push me over the edge and try to buy one :)
- xchip 3y agoA more honest headline would be "TRS-80 connected through serial port to esp32"
- druid77 3y agoThanks for your comment. I think it's an accurate headline, as the client and server code I wrote (which goes through the hardware TRS-IO (which, yes, has the ESP32 chip on it)) allows for ChatGPT interaction on the TRS-80. The I/O module (TRS-IO) is just providing a way for a BASIC program (the "client") to send and receive network requests over the serial port. The client is essentially a dumb terminal, and doesn't have much logic at all. I’m running a python "server" on a Linux box (AWS EC2) that handles the request then constructs an OpenAI call from there, then passes the response back to the TRS-80. So that's what I'm trying to represent as the client/server in the headline :). Most of the work I did was in creating the client and server, not just plugging in hardware. Although I did spend a painful amount of time cleaning the keys, and just generally figuring out an approach. I think a good title would be "TRS-80 as a dumb terminal to ChatGPT".
- philjohn 3y agoBut can it play a nice game of Chess?
- glimshe 3y agoOnly if your name is Dr Falken!