stakwork / sphinx-nav-fiber

11 stars 45 forks source link

Teach Me button #255

Open soup20 opened 1 year ago

soup20 commented 1 year ago

Concept: A button a user can press after they make a Second Brain search that will give them a tutorial on the topic they searched for.

  1. Create a button on the front end called "Teach Me" that shows up next to the search.
  2. When the button is clicked, we send the transcripts of the first 5 results, along with the search term, to Boltwall: (meanwhile Frontend displays a "Generating Tutorial" animation)
    "term": {SEARCH TERM},
    "transcripts": {STRING OF FIRST 5 TRANSCRIPTS}
  3. User must pay X sats to get the tutorial.
  4. Boltwall passes data to Jarvis.
  5. Jarvis passes data to Stakwork:
    curl -k  -L -X POST -H 'Content-Type: application/json' -H 'Authorization: Token 
    token="690d8f037df0fdb002836edfddf4b626"' -d '{
    "name": "Second Brain Content",
    "workflow_id": 8845,
    "workflow_params": {
        "set_var": {
            "attributes": {
                "vars": {
                    "term": {SEARCH TERM},
                    "transcripts": {STRING OF FIRST 5 TRANSCRIPTS}
                }
            }
        }
    }
    }' 'https://jobs.stakwork.com/api/v1/projects'
  6. Stakwork generates tutorial and sends it to the front end (directly? what's the best way to do this?)
  7. Front end displays tutorial for the user.

test

soup20 commented 1 year ago

Add: Expertise Level

An advanced option where a user can specify their expertise level, and we'll give them an answer based on that.

We could have options in a dropdown menu (default: Medium):

We will submit their expertise level with the other data to the /teach-me endpoint, so it would look like:

"term": {SEARCH TERM},
"transcripts": {STRING OF FIRST 5 TRANSCRIPTS}
"expertise_level": {EXPERTISE LEVEL}
kevkevinpal commented 1 year ago

I think we can close this @soup20