danielmiessler / fabric

fabric is an open-source framework for augmenting humans using AI. It provides a modular framework for solving specific problems using a crowdsourced set of AI prompts that can be used anywhere.
https://danielmiessler.com/p/fabric-origin-story
MIT License
25.36k stars 2.69k forks source link

[Bug]: No way to ingest youtube or create transcripts in latest version installed via go #947

Closed grimmolf closed 1 month ago

grimmolf commented 2 months ago

What happened?

ENVIRONMENT: Red Hat Enterprise Linux release 9.4 (Plow) GO VERSION: go version go1.23.1 linux/amd64

go install github.com/danielmiessler/fabric@latest installed fabric into $HOME/go/bin , but the version installed does not have the -y flag option, and neither yt nor ts apps were installed.

Version check

Relevant log output

[grimm@localhost ~]$ fabric -h
Usage:
  fabric [OPTIONS]

Application Options:
  -p, --pattern=                    Choose a pattern
  -C, --context=                    Choose a context
      --session=                    Choose a session
  -S, --setup                       Run setup
      --setup-skip-update-patterns  Skip update patterns at setup
  -t, --temperature=                Set temperature (default: 0.7)
  -T, --topp=                       Set top P (default: 0.9)
  -s, --stream                      Stream
  -P, --presencepenalty=            Set presence penalty (default: 0.0)
  -F, --frequencypenalty=           Set frequency penalty (default: 0.0)
  -l, --listpatterns                List all patterns
  -L, --listmodels                  List all available models
  -x, --listcontexts                List all contexts
  -X, --listsessions                List all sessions
  -U, --updatepatterns              Update patterns
  -c, --copy                        Copy to clipboard
  -m, --model=                      Choose model
  -o, --output=                     Output to file
  -n, --latest=                     Number of latest patterns to list (default: 0)
  -d, --changeDefaultModel          Change default pattern

Help Options:
  -h, --help                        Show this help message

[grimm@localhost ~]$ fabric -y
unknown flag `y'

Relevant screenshots (optional)

No response

derek3131 commented 2 months ago

Go towards the bottom of the README.md under the "Helper Apps" section.

yt Installation

To install yt, install it the same way as you install Fabric, just with a different repo name.

go install github.com/danielmiessler/yt@latest

Be sure to add your YOUTUBE_API_KEY to ~/.config/fabric/.env.

grimmolf commented 2 months ago

Go towards the bottom of the README.md under the "Helper Apps" section.

yt Installation

To install yt, install it the same way as you install Fabric, just with a different repo name.

go install github.com/danielmiessler/yt@latest

Be sure to add your YOUTUBE_API_KEY to ~/.config/fabric/.env.

Ah, I see that. The README shows -y as an option, is that just not included yet, and is there still a way to get the ts helper app?

coachdamon commented 2 months ago

Having a similar problem here....I migrated from the python version to use go. Installed go with the package manager on silicon-based MBP. Added these into .zshrc (export GOROOT=/opt/homebrew/bin/go export GOPATH=$HOME/go export PATH=$GOPATH/bin:$GOROOT/bin:$HOME/.local/bin:$PATH:) but the go directory doesn't exist under /opt/homebrew/bin.

This prevents me from installing yt, of course, but also makes me wonder if there's something else not configured correctly. Fabric seems to respond ok, but just checking. Any thoughts?

eugeis commented 1 month ago

I can't reproduce it, please try again.

Here my output:

`❯ go install github.com/danielmiessler/fabric@latest go: downloading github.com/danielmiessler/fabric v1.4.21

~ via 🐹 v1.23.1 took 14s ❯ fabric no session, pattern or user messages provided

~ via 🐹 v1.23.1 ❯ fabric -h Usage: fabric [OPTIONS]

Application Options: -p, --pattern= Choose a pattern -v, --variable= Values for pattern variables, e.g. -v=$name:John -v=$age:30 -C, --context= Choose a context --session= Choose a session -S, --setup Run setup --setup-skip-update-patterns Skip update patterns at setup -t, --temperature= Set temperature (default: 0.7) -T, --topp= Set top P (default: 0.9) -s, --stream Stream -P, --presencepenalty= Set presence penalty (default: 0.0) -r, --raw Use the defaults of the model without sending chat options (like temperature etc.) and use the user role instead of the system role for patterns. -F, --frequencypenalty= Set frequency penalty (default: 0.0) -l, --listpatterns List all patterns -L, --listmodels List all available models -x, --listcontexts List all contexts -X, --listsessions List all sessions -U, --updatepatterns Update patterns -c, --copy Copy to clipboard -m, --model= Choose model -o, --output= Output to file -n, --latest= Number of latest patterns to list (default: 0) -d, --changeDefaultModel Change default pattern -y, --youtube= YouTube video url to grab transcript, comments from it and send to chat --transcript Grab transcript from YouTube video and send to chat --comments Grab comments from YouTube video and send to chat --dry-run Show what would be sent to the model without actually sending it -u, --scrape_url= Scrape website URL to markdown using Jina AI -q, --scrape_question= Search question using Jina AI

Help Options: -h, --help Show this help message`

eugeis commented 1 month ago

Please use

fabric -y "url" ...