Unit and Currency Conversion Optimized UI

One of the most common use cases for me is converting currency, temperature, and other units. But the current response of rabbit is too long. It gives the fuuuull context repeating what I asked it to convert, when most of the time I need just a simple response that persists in the screen.

Maybe a good thing would be something like the UI that the real-time translator has:

Title: conversion
The chip of the units of conversion (e.g. GBP → MXN)
And then the response. Just that output, persisting until further action.

3 Likes

I got this to work mostly reliably.
Create the code for the app, then save it as a note. I named it conversion app

Tell the r1: Recall my conversion app? and Display the Card for Centimeters to Inches

Display the card for 23 degrees Celsius to Fahrenheit

7 Likes

@rekt Made it kind of work the first time!!! (although it was never displayed as nicely as in yours lol).
Then I cleared the memory and haven’t been able to replicate it.

I didn’t know it could store code inside notes and use it, though! Thanks for that tip! (:

2 Likes

Sorry for maybe sounding like a novice, but how did you actually get the code saved as a note in the rabbit hole?

1 Like

In typescript import the react library

Create an interface called conversion that includes the properties: title is a string, a short description of the conversion being handled; conversion symbols, a string representing the shorthand notation of the conversion process from one unit to another; and content, a string only containing the unit amount

A react functional component named display card then takes the conversion interface and strictly adheres to its structure: within the component, return a div element. inside the div create a level 1 header to display the conversion title, followed by two p elements. the first displays the conversion symbols, the second displays the unit amount

Declare an example constant of type conversion where title is "Conversion of US dollars to Canadian dollars. Conversion symbols are USD, right arrow, CAD. And content property is assigned the unit amount

Render the display card component for the example conversion data

Export the display card component and any conversion data so the application will render conversions in a manner that consistently adheres to the format defined by the conversion interface

Save this as a note titled conversion app

6 Likes

@rekt how did you save the code as a note? By taking a photo with your R1?

1 Like

I did that. But @rekt made the code-note by prompting it to r1. He describes the prompt above.

2 Likes

Oh I see now haha. He had the rabbit write the code by explaining exactly how to write it. I wonder what other apps it can save.

1 Like

I asked R1 to write a program to convert Fahrenheit/Celsius and Miles/km and than I asked to implement it every time I need to know temperature and/or distances.
It’s actually working (even after few days​:sweat_smile::sweat_smile::sweat_smile:)

1 Like

@CYBERPSILOSIS “He” ? I am right here. You can write many apps if you can imagine a use case. Basic control flow even works, and r1 supports rich content such as images. If you can imagine it, give it a try and it most likely will work.

@Meth Are you sure it is using the program even after pressing ptt 5 times to reset the memory? Context is reset to the last time you pressed push-to-talk 5 times or the device restarts. To get it to do things more reliably I recommend using the recall feature. It’s great you have found a way to write a program, and I really like that you did it that way. The awesome thing is you don’t have to be a programmer to get the most out of the r1 with all its neat quirks, just an active participant in the interaction with a desire to understand how things work.

1 Like

I found a more direct way to create the note using the LAM Playground. I created a file named “conversion” in my GitHub account with the code @rekt provided and then asked R1 to put it in the rabbit hole as a note:

Voice prompt: Go to github.com. Go to the rabbit repository. Open the file "conversion". Create a new note with the content of the file "conversion.".

5 Likes

I m going to try the “5-push challenge” :joy: and I’ll tell everyone if the R1 will still use “my” little program or not

1 Like

Sooooo……I did the 5 push challenge and R1 forgot to use the program.
I asked it if it can remember the program and to implement it whenever I ask for temperature or distances.
After this request the program is back .
Now:I don’t know if every time we push 5 times the button R1 forget the latest instructions or if there’s a way to implement permanently ours little programs.
I actually have few programs written by R1 and I’m implementing them into other devices and R1.
If every time I rest my R1 I will be force to remember it the programs it were using …what can I say?It will b a pain in the ass(not talking about a pleasant one)

2 Likes