From 94f1637d69b3b6407a032c8bbad7f790cfd36384 Mon Sep 17 00:00:00 2001 From: ywangalex Date: Mon, 4 Nov 2024 09:58:53 +0800 Subject: [PATCH 1/2] Create pr_agent.yml --- .github/workflows/pr_agent.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/pr_agent.yml diff --git a/.github/workflows/pr_agent.yml b/.github/workflows/pr_agent.yml new file mode 100644 index 00000000..eda0f739 --- /dev/null +++ b/.github/workflows/pr_agent.yml @@ -0,0 +1,20 @@ +on: + pull_request: + types: [opened, reopened, ready_for_review] + issue_comment: +jobs: + pr_agent_job: + if: ${{ github.event.sender.type != 'Bot' }} + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + contents: write + name: Run pr agent on every pull request, respond to user comments + steps: + - name: PR Agent action step + id: pragent + uses: Codium-ai/pr-agent@main + env: + OPENAI_KEY: ${{ secrets.OPENAI_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 7b2a6c8f9eb3d28d678d221c837404e998dd5bc0 Mon Sep 17 00:00:00 2001 From: ywangalex Date: Mon, 4 Nov 2024 10:12:40 +0800 Subject: [PATCH 2/2] Update route.ts --- src/app/api/txt2img/route.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/api/txt2img/route.ts b/src/app/api/txt2img/route.ts index 4a09895d..09c3a483 100644 --- a/src/app/api/txt2img/route.ts +++ b/src/app/api/txt2img/route.ts @@ -4,6 +4,8 @@ import { NextResponse } from "next/server"; dotenv.config({ path: `.env.local` }); +clip + export async function POST(request: Request) { const { prompt } = await request.json(); const replicate = new Replicate({