Skip to content

Commit

Permalink
Add workflow for reconfiguring AI assistant
Browse files Browse the repository at this point in the history
  • Loading branch information
pkosiec committed May 9, 2024
1 parent 1648bb4 commit c672f10
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/update-ai-assistant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Update AI assistant

on:
push:
tags:
- '*'
branches:
- main
- ai-docs-follow-up

env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

jobs:
update-ai-assistant:
name: Reconfigure OpenAI assistant
runs-on: ubuntu-22.04
steps:
- name: Set environment variables
run: |
if [[ $GITHUB_REF_NAME == refs/tags/* ]]; then
# tag push
echo "ASSISTANT_ENV=prod" >> $GITHUB_ENV
elif [[ $GITHUB_REF_NAME == refs/heads/* ]]; then
# branch push
echo "ASSISTANT_ENV=dev" >> $GITHUB_ENV
fi
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node
uses: volta-cli/action@v4

- name: Reconfigure assistant
run: |
cd ./hack/assistant-setup
npm install
npm start
4 changes: 2 additions & 2 deletions hack/assistant-setup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { setupFileSearch } from "./file-search";
import { setupTools } from "./tools";
import dedent from "dedent";

const prodAssistantID = "asst_eMM9QaWLi6cajHE4PdG1yU53";
const devAssistantID = "asst_ejVrAgjhhvCw6jGFYq5JyBqj";
const prodAssistantID = "asst_EOOt8PiAy1boLPMTrFPdalHg"; // FIXME: pkosiec
const devAssistantID = "asst_EOOt8PiAy1boLPMTrFPdalHg"; // FIXME: pkosiec

const model = "gpt-4-turbo";
const temperature = 0.1;
Expand Down

0 comments on commit c672f10

Please sign in to comment.