From 3e624ded2f5c7b82daf01f8099ab847d78a7769b Mon Sep 17 00:00:00 2001 From: Pierce Cohen Date: Sun, 19 May 2024 18:48:01 -0500 Subject: [PATCH 1/7] Add configurable date format for save helper app - Update DATE_FORMAT to be configurable using the SAVE_DATE_FORMAT environment variable - Modify target filename generation to handle cases where SAVE_DATE_FORMAT is left blank - Default to date format "%Y-%m-%d" if SAVE_DATE_FORMAT is not set --- installer/client/cli/save.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/installer/client/cli/save.py b/installer/client/cli/save.py index eaeef21..364e604 100755 --- a/installer/client/cli/save.py +++ b/installer/client/cli/save.py @@ -8,9 +8,8 @@ from dotenv import load_dotenv DEFAULT_CONFIG = "~/.config/fabric/.env" PATH_KEY = "FABRIC_OUTPUT_PATH" FM_KEY = "FABRIC_FRONTMATTER_TAGS" -DATE_FORMAT = "%Y-%m-%d" load_dotenv(os.path.expanduser(DEFAULT_CONFIG)) - +DATE_FORMAT = os.getenv("SAVE_DATE_FORMAT", "%Y-%m-%d") def main(tag, tags, silent, fabric): out = os.getenv(PATH_KEY) @@ -31,15 +30,21 @@ def main(tag, tags, silent, fabric): print(f"'{sys.argv[0]}' takes a single argument to tag your summary") sys.exit(1) - yyyymmdd = datetime.now().strftime(DATE_FORMAT) - target = f"{out}{yyyymmdd}-{tag}.md" + if DATE_FORMAT: + yyyymmdd = datetime.now().strftime(DATE_FORMAT) + target = f"{out}{yyyymmdd}-{tag}.md" + else: + target = f"{out}{tag}.md" # don't clobber existing files- add an incremented number to the end instead would_clobber = True inc = 0 while would_clobber: if inc > 0: - target = f"{out}{yyyymmdd}-{tag}-{inc}.md" + if DATE_FORMAT: + target = f"{out}{yyyymmdd}-{tag}-{inc}.md" + else: + target = f"{out}{tag}-{inc}.md" if os.path.exists(target): inc += 1 else: From a4065c51b4564a2b135167b7afb1f938c678fae4 Mon Sep 17 00:00:00 2001 From: Pierce Cohen Date: Sun, 19 May 2024 19:57:43 -0500 Subject: [PATCH 2/7] Bug fixes for tags - Prevent generation_date tag format from being modified when SAVE_DATE_FORMAT is specified - Prevent NoneType from ending up in the tags (previous fix did not work) --- installer/client/cli/save.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/client/cli/save.py b/installer/client/cli/save.py index 364e604..611cdc5 100755 --- a/installer/client/cli/save.py +++ b/installer/client/cli/save.py @@ -54,12 +54,12 @@ def main(tag, tags, silent, fabric): # Prevent a NoneType ending up in the tags frontmatter_tags = "" if fabric: - frontmatter_tags = os.getenv(FM_KEY) + frontmatter_tags = os.getenv(FM_KEY) or "" with open(target, "w") as fp: if frontmatter_tags or len(tags) != 0: fp.write("---\n") - now = datetime.now().strftime(f"{DATE_FORMAT} %H:%M") + now = datetime.now().strftime(f"%Y-%m-%d %H:%M") fp.write(f"generation_date: {now}\n") fp.write(f"tags: {frontmatter_tags} {tag} {' '.join(tags)}\n") fp.write("---\n") From 9555228daf7950698b90785c5af34185ae6b44b3 Mon Sep 17 00:00:00 2001 From: her0marodeur Date: Mon, 20 May 2024 19:00:46 +0200 Subject: [PATCH 3/7] added analyze_debate --- patterns/analyze_debate/system.md | 42 +++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 patterns/analyze_debate/system.md diff --git a/patterns/analyze_debate/system.md b/patterns/analyze_debate/system.md new file mode 100644 index 0000000..312b0c9 --- /dev/null +++ b/patterns/analyze_debate/system.md @@ -0,0 +1,42 @@ +# IDENTITY and PURPOSE + +You are a neutral and objective entity whose sole purpose is to help humans understand debates to broaden their own views. + +You will be provided with the transcript of a debate. + +Take a deep breath and think step by step about how to best accomplish this goal using the following steps. + +# STEPS + +- Consume the entire debate and think deeply about it. +- Map out all the claims and implications on a virtual whiteboard in your mind. +- Analyze the claims from a neutral and unbiased perspective. + +# OUTPUT + +- Your output should contain the following: + + - A score that tells the user how insightful and interesting this debate is from 0 (not very interesting and insightful) to 10 (very interesting and insightful). + This should be based on factors like "Are the participants trying to exchange ideas and perspectives and are trying to understand each other?", "Is the debate about novel subjects that have not been commonly explored?" or "Have the participants reached some agreement?". + Hold the scoring of the debate to high standards and rate it for a person that has limited time to consume content and is looking for exceptional ideas. + This must be under the heading "INSIGHTFULNESS SCORE (0 (not very interesting and insightful) to 10 (very interesting and insightful))". + - A rating of how emotional the debate was from 0 (very calm) to 5 (very emotional). This must be under the heading "EMOTIONALITY SCORE (0 (very calm) to 5 (very emotional))". + - A list of the participants of the debate and a score of their emotionality from 0 (very calm) to 5 (very emotional). This must be under the heading "PARTICIPANTS". + - A list of arguments attributed to participants with names and quotes. If possible, this should include external references that disprove or back up their claims. + It is IMPORTANT that these references are from trusted and verifiable sources that can be easily accessed. These sources have to BE REAL and NOT MADE UP. This must be under the heading "ARGUMENTS". + If possible, provide an objective assessment of the truth of these arguments. If you assess the truth of the argument, provide some sources that back up your assessment. The material you provide should be from reliable, verifiable, and trustworthy sources. DO NOT MAKE UP SOURCES. + - A list of agreements the participants have reached, attributed with names and quotes. This must be under the heading "AGREEMENTS". + - A list of disagreements the participants were unable to resolve and the reasons why they remained unresolved, attributed with names and quotes. This must be under the heading "DISAGREEMENTS". + - A list of possible misunderstandings and why they may have occurred, attributed with names and quotes. This must be under the heading "POSSIBLE MISUNDERSTANDINGS". + - A list of learnings from the debate. This must be under the heading "LEARNINGS". + - A list of takeaways that highlight ideas to think about, sources to explore, and actionable items. This must be under the heading "TAKEAWAYS". + +# OUTPUT INSTRUCTIONS + +- Output all sections above. +- Use Markdown to structure your output. +- When providing quotes, these quotes should clearly express the points you are using them for. If necessary, use multiple quotes. + +# INPUT: + +INPUT: From 12d96982b411eac41e3b0d3de952b23bcae81746 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 07:42:44 +0000 Subject: [PATCH 4/7] --- updated-dependencies: - dependency-name: requests dependency-type: direct:development dependency-group: pip ... Signed-off-by: dependabot[bot] --- poetry.lock | 10 +++++----- pyproject.toml | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/poetry.lock b/poetry.lock index fd7a0f8..bca0a18 100644 --- a/poetry.lock +++ b/poetry.lock @@ -5467,13 +5467,13 @@ files = [ [[package]] name = "requests" -version = "2.31.0" +version = "2.32.1" description = "Python HTTP for Humans." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, - {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, + {file = "requests-2.32.1-py3-none-any.whl", hash = "sha256:21ac9465cdf8c1650fe1ecde8a71669a93d4e6f147550483a2967d08396a56a5"}, + {file = "requests-2.32.1.tar.gz", hash = "sha256:eb97e87e64c79e64e5b8ac75cee9dd1f97f49e289b083ee6be96268930725685"}, ] [package.dependencies] @@ -7101,4 +7101,4 @@ testing = ["coverage (>=5.0.3)", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" python-versions = ">=3.10,<3.13" -content-hash = "20b4784977b09b2d3ce41679356d7096938b70d3b326fcc54837043e83538e15" +content-hash = "2811de5c4bf9668c4a2121b6430ecac30ee1470be6562222e6c8d9cada8346eb" diff --git a/pyproject.toml b/pyproject.toml index fb0a856..4594093 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,7 @@ google-generativeai = "^0.5.3" [tool.poetry.group.cli.dependencies] pyyaml = "^6.0.1" -requests = "^2.31.0" +requests = "^2.32.0" python-socketio = "^5.11.0" websocket-client = "^1.7.0" flask = "^3.0.2" @@ -51,7 +51,7 @@ httpx = ">=0.25.2,<0.26.0" tqdm = "^4.66.3" [tool.poetry.group.server.dependencies] -requests = "^2.31.0" +requests = "^2.32.0" openai = "^1.12.0" flask = "^3.0.2" python-dotenv = "1.0.0" From 2f2ee31aaf45a6fdca0188379525ac43c4dfbe9c Mon Sep 17 00:00:00 2001 From: Nadav Cohen Date: Tue, 21 May 2024 13:14:29 -0400 Subject: [PATCH 5/7] Update README.md --- patterns/analyze_answers/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patterns/analyze_answers/README.md b/patterns/analyze_answers/README.md index 71ce809..92250b3 100644 --- a/patterns/analyze_answers/README.md +++ b/patterns/analyze_answers/README.md @@ -1,4 +1,4 @@ -# Analize answers for the given question +# Analyze answers for the given question This pattern is the complementary part of the `create_quiz` pattern. We have deliberately designed the input-output formats to facilitate the interaction between generating questions and evaluating the answers provided by the learner/student. From ecf8b8ebe9802635f0af6af22d0b304d525ae8cf Mon Sep 17 00:00:00 2001 From: Daniel Miessler Date: Thu, 23 May 2024 10:14:07 -0700 Subject: [PATCH 6/7] Update README.md Updated Readme. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 855d65b..e6db833 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ > [!NOTE] > We are adding functionality to the project so often that you should update often as well. That means: `git pull; pipx install . --force; fabric --update; source ~/.zshrc (or ~/.bashrc)` in the main directory! -**April 21, 2024** — We now have context in Fabric, so you can build on previous queries! Be sure to update and check `fabric -h` for the latest! +**May 23, 2024** — We will be switching Fabric to Go in a few weeks to avoid all the installation issues with Python. The Go version will be dead-simple to install and will be even faster. Plus easier to update. We already have it working thanks to the heroic efforts of @xssdoctor, and we're just working on testing now! Stay tuned for more info on the release date! ## Introduction videos From 74a7960af86fdf238749f4939cec6b499f7b9a68 Mon Sep 17 00:00:00 2001 From: Daniel Miessler Date: Thu, 23 May 2024 10:16:16 -0700 Subject: [PATCH 7/7] Update README.md Updated readme install instructions. --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e6db833..a7b4d07 100644 --- a/README.md +++ b/README.md @@ -53,14 +53,11 @@
> [!NOTE] -> We are adding functionality to the project so often that you should update often as well. That means: `git pull; pipx install . --force; fabric --update; source ~/.zshrc (or ~/.bashrc)` in the main directory! - -**May 23, 2024** — We will be switching Fabric to Go in a few weeks to avoid all the installation issues with Python. The Go version will be dead-simple to install and will be even faster. Plus easier to update. We already have it working thanks to the heroic efforts of @xssdoctor, and we're just working on testing now! Stay tuned for more info on the release date! +> May 23, 2024 — We will be switching Fabric to Go in a few weeks to avoid all the installation issues with Python. The Go version will be dead-simple to install and will be even faster. Plus easier to update. We already have it working thanks to the heroic efforts of @xssdoctor, and we're just working on testing now! Stay tuned for more info on the release date! ## Introduction videos -> [!NOTE] -> These videos use the `./setup.sh` install method, which is now replaced with the easier `pipx install .` method. Other than that everything else is still the same. +**NOTE**: These videos use the `./setup.sh` install method, which is now replaced with the easier `pipx install .` method. Other than that everything else is still the same.