stakwork / sphinx-nav-fiber

11 stars 45 forks source link

Teach me button #278

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 (endpoint name /generate_tutorial): (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.
soup20 commented 1 year ago

@Rassl you only need to focus on steps 1 & 2

kevkevinpal commented 1 year ago

can we close this @soup20