diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..46481e6 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,27 @@ +name: Vercel Production Deployment +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} +on: + push: + branches: + - main + - feat/assistant +jobs: + Deploy-Production: + runs-on: ubuntu-latest + steps: + - name: npm install, build, and test + run: | + npm install -g @nestjs/cli + npm install + npm run build + - uses: actions/checkout@v2 + - name: Install Vercel CLI + run: npm install --global vercel@latest + - name: Pull Vercel Environment Information + run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} + - name: Build Project Artifacts + run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} + - name: Deploy Project Artifacts to Vercel + run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} \ No newline at end of file diff --git a/src/chat/chat.config.ts b/src/chat/chat.config.ts index ff31258..0ae23b8 100644 --- a/src/chat/chat.config.ts +++ b/src/chat/chat.config.ts @@ -3,8 +3,8 @@ import { AssistantCreateParams } from 'openai/resources/beta'; import { AssistantConfig } from '../assistant/assistant.model'; export const assistantParams: AssistantCreateParams = { - name: 'AI Template', - instructions: `You are a personal assistant.`, + name: 'Pokemon Assistant', + instructions: `You can ask questions about Pokemon. For example, "What is Pikachu's type?" or "What is Pikachu's base stats?", or "Which pokemon has a bigger chance of winning in a battle between Pikachu and Charmander?".`, tools: [{ type: 'retrieval' }], model: 'gpt-4-1106-preview', metadata: {}, diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..5d6f064 --- /dev/null +++ b/vercel.json @@ -0,0 +1,21 @@ +{ + "version": 2, + "builds": [ + { + "src": "src/main.ts", + "use": "@vercel/node" + } + ], + "routes": [ + { + "src": "/(.*)", + "dest": "src/main.ts", + "methods": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + } + ] +} \ No newline at end of file