Closed HatBeardMe closed 3 months ago
Breaking the command down into smaller chunks allows you to examine what is being sent to OpenAi.
Anything before | fabric -sp summarize_git_changes
happens independently of Fabric. For example:
✭ ᐅ git log --pretty=format:"%h - %an, %ar : %s" --stat | head -n 500
Returns this when run against a local repository of mine:
71069d1 - zKWolf, 12 days ago : Merge branch 'main' of https://github.com/nopslip/NP4k-extractor
5e54cbf - zKWolf, 12 days ago : add readme
readme.md | 141 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 141 insertions(+)
66c3549 - zKWolf, 12 days ago : Create LICENSE
LICENSE | 661 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 661 insertions(+)
35261f9 - zKWolf, 12 days ago : OG commit
_output_sample.list.txt_1709925366.json | 237 ++++++++++++++++++++++++++++++++
_output_sample.list.txt_1709930183.txt | 45 ++++++
extract_articles.py | 119 ++++++++++++++++
sample.list.txt | 5 +
4 files changed, 406 insertions(+)
This text is piped to the Fabric pattern you use in the INPUT section. For the summarize_git_changes pattern we would be sending this to OPEN AI:
IDENTITY and PURPOSE
You are an expert project manager and developer, and you specialize in creating super clean updates for what changed a Github project in the last 7 days.
STEPS
Read the input and figure out what the major changes and upgrades were that happened.
Create a section called CHANGES with a set of 10-word bullets that describe the feature changes and updates.
OUTPUT INSTRUCTIONS
Output a 20-word intro sentence that says something like, "In the last 7 days, we've made some amazing updates to our project focused around
."
You only output human readable Markdown, except for the links, which should be in HTML format.
Write the update bullets like you're excited about the upgrades.
INPUT:
INPUT:
71069d1 - zKWolf, 12 days ago : Merge branch 'main' of https://github.com/nopslip/NP4k-extractor
5e54cbf - zKWolf, 12 days ago : add readme
readme.md | 141 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 141 insertions(+)
66c3549 - zKWolf, 12 days ago : Create LICENSE
LICENSE | 661 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 661 insertions(+)
35261f9 - zKWolf, 12 days ago : OG commit
_output_sample.list.txt_1709925366.json | 237 ++++++++++++++++++++++++++++++++
_output_sample.list.txt_1709930183.txt | 45 ++++++
extract_articles.py | 119 ++++++++++++++++
sample.list.txt | 5 +
4 files changed, 406 insertions(+)
Essentially it's:
[your input/text/context + Fabric Pattern prompt] --> Open AI
Ultimately, the input/context that you feed to Fabric (and thus OpenAI) is completely up to you (outside of the pattern itself).
Thank you for the explanation. I saw the pattern doc, but I didn't understand that was the prompt for the chatbot. I was concerned that fabric might "do something else" (e.g., git diff
) with my repo to get change information - outside of what was piped in.
Glad to have that cleared up, thanks @zKWolf
What is your question?
I am interested in the
summarize_git_changes
pattern as highlighted in Daniel's newsletter.What data is sent back to openai using the gpt-4-turbo API? Is it only the commit messages or also code from the repo related to those commits?
Ex.:
git log --pretty=format:"%h - %an, %ar : %s" --stat | head -n 500 | fabric -sp summarize_git_changes
I think that all patterns should explain the data usage for privacy and compliance reasons.