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
23.91k stars 2.56k forks source link

[Question]: Cant output / save a file using --output or | save #855

Open crypto-kungfu opened 2 months ago

crypto-kungfu commented 2 months ago

What is your question?

Hello,

I am currently working with the Fabric application, and I am facing an issue with saving or outputting files. Here are the details:

What I've Tried:

  1. I have verified that the output path 'C:****\Documents\Obsidian Vault\Inbox\Fabric' is valid and accessible on my host machine. this is correctly set in the .env file
  2. I checked the permissions for the directory, and they seem to be fine.
  3. I attempted to check the application logic to ensure it is configured to write to the correct path.

Current Issue: Despite the application executing without errors, I am unable to locate the output files on my host machine. I suspect that the files may not be created as expected.

What I'm Trying to Achieve: I would like to understand how to configure the Fabric application to ensure that output files are saved to a specific directory on my host machine. Any guidance on troubleshooting this issue would be greatly appreciated.

Several videos i've watched seemed to use "| save" but i'm guessing this was replaced with --output? my test command is "yt -transcript https://www.youtube.com/watch?v=wPEyyigh10g | fabric -sp extract_wisdom --output=output.txt"

Transcript is correctly pulled, passed to fabric and wisdom extracted but nothing saved to my FABRIC_OUTPUT_PATH

Thank you for your help!

pallavbudhkar commented 2 months ago

facing similar issue. "save" is not working at all. Mac says command not found. -o or --output is creating file in same directory from where the yt/pbpaste | fabric command is executed. it seems the variable FABRIC_OUTPUT_PATH is not being read for creating the output file. File created is not having any extension (.md or .txt)

xssdoctor commented 2 months ago

i'm sorry, i dont really understand the problem. you can use -o and save the output anywhere on your computer. just do fabric -o [location you want the output file]. So for example, if you want it in ~/desktop/myoutputdirectory just do echo "whatever" | fabric -o ~/desktop/myoutputdirectory/output and it will be there

pallavbudhkar commented 2 months ago

Thanks @xssdoctor it worked. I watched few videos for integration of obsidian and fabric and their the confusion started. so now its all good. I saved the path for obsidian vault in a variable and called it in the fabric command. below worked perfectly - yt --transcript https://www.youtube.com/watch?v=UbDyjIIGaxQ | fabric -sp extract_wisdom -o $OBS/"start with fabric.md"

RFingAdam commented 1 month ago

@pallavbudhkar @crypto-kungfu, See this other thread for the work around, which adds back in the save command via a script. https://github.com/danielmiessler/fabric/issues/831#issuecomment-2304875874

crypto-kungfu commented 1 month ago

So non of the working solutions are setting FABRIC_OUTPUT_PATH= in the .env file? Amazingly, I still can't get it to save. Did you install via Go?

pallavbudhkar commented 1 month ago

So non of the working solutions are setting FABRIC_OUTPUT_PATH= in the .env file? Amazingly, I still can't get it to save. Did you install via Go?

I do not think FABRIC_OUTPUT_PATH is required any more.
I installed GO and installed to latest fabric.
created a env variable in zsh and bash profile and use that variable in --output=. or -o with double quotes (for the space in folder or file name) .. and it works perfectly. ex.-- yt --transcript https://www.youtube.com/watch?v=yCSQ76Cbi3g | fabric -sp summarize -o "$OBS/my example file.md"

caunus commented 1 month ago

The is no save command in the current go implementation. If you still nee the convince that the save command supports, have a look at this: https://github.com/danielmiessler/fabric/issues/831. There is a script, that somehow simulate the save command. If you have trouble with the -o option, one issue might be space in the path name...