-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
233 changed files
with
21,619 additions
and
518 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"image": "mcr.microsoft.com/devcontainers/universal:2", | ||
"features": { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.git | ||
.gitignore | ||
.env | ||
README.md | ||
docker-compose.yml | ||
Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
watch_file shell.nix | ||
use flake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Patterns Artifact | ||
|
||
on: | ||
push: | ||
paths: | ||
- "patterns/**" # Trigger only on changes to files in the patterns folder | ||
|
||
jobs: | ||
zip-and-upload: | ||
name: Zip and Upload Patterns Folder | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Verify Changes in Patterns Folder | ||
run: | | ||
git fetch origin | ||
if git diff --quiet HEAD~1 -- patterns; then | ||
echo "No changes detected in patterns folder." | ||
exit 1 | ||
fi | ||
- name: Zip the Patterns Folder | ||
run: zip -r patterns.zip patterns/ | ||
|
||
- name: Upload Patterns Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: patterns | ||
path: patterns.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Use official golang image as builder | ||
FROM golang:1.23.3-alpine AS builder | ||
|
||
# Set working directory | ||
WORKDIR /app | ||
|
||
# Copy go mod and sum files | ||
COPY go.mod go.sum ./ | ||
|
||
# Download dependencies | ||
RUN go mod download | ||
|
||
# Copy source code | ||
COPY . . | ||
|
||
# Build the application | ||
RUN CGO_ENABLED=0 GOOS=linux go build -o fabric | ||
|
||
# Use scratch as final base image | ||
FROM alpine:latest | ||
|
||
# Copy the binary from builder | ||
COPY --from=builder /app/fabric /fabric | ||
|
||
# Copy patterns directory | ||
COPY patterns /patterns | ||
|
||
# Ensure clean config directory and copy ENV file | ||
RUN rm -rf /root/.config/fabric && \ | ||
mkdir -p /root/.config/fabric | ||
COPY ENV /root/.config/fabric/.env | ||
|
||
# Add debug commands | ||
RUN ls -la /root/.config/fabric/ | ||
|
||
# Expose port 8080 | ||
EXPOSE 8080 | ||
|
||
# Run the binary with debug output | ||
ENTRYPOINT ["/fabric"] | ||
CMD ["--serve"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
DEFAULT_VENDOR=OpenRouter | ||
DEFAULT_MODEL=openai/gpt-3.5-turbo-0125 | ||
DEFAULT_MODEL_CONTEXT_LENGTH=128K | ||
PATTERNS_LOADER_GIT_REPO_URL=https://github.com/danielmiessler/fabric.git | ||
PATTERNS_LOADER_GIT_REPO_PATTERNS_FOLDER=patterns | ||
OPENROUTER_API_KEY=sk-or-v1- | ||
OPENROUTER_API_BASE_URL=https://openrouter.ai/api/v1 | ||
YOUTUBE_API_KEY=AIzaS | ||
JINA_AI_API_KEY=jina_57 |
Oops, something went wrong.