|
|
|
|
|
by hartem_
1162 days ago
|
|
It's similar to javascript, but not exactly identical. Here is an example that sends a summary of calendar event two minutes before it starts (uses gmail, openai and slack): ```
function (recipient) {\n
when: __0 = GoogleCalendar.when_next_event_is_in(time: B.Duration(120000));\n
__1 = GoogleCalendar.get_next_event();\n
__2 = OpenAI.get_summary_of(text: __1.description);\n
__3 = BardeenCommons.get_string_concatenating_strings(strings: ["Your next event is:", __1.summary, "at", __1.startTime, "Here is a summary of the event:", __2]);\n Slack.send_message(message: __3, recipient: recipient);\n}'
``` Initial accuracy was about 10%, which was pretty meh TBH. With a lot of tweaking and tuning we were able to get it to 70%. This means that it takes about 2-3 attempts to get it to generate what's expected. The great thing is that we only use AI to generate the DSL description of the automation and let the user tweak and tune it. Once it's there we just execute it with our engine. |
|