Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue(2): initial chatgpt prompt + parsing logic #36

Merged
merged 15 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ DB_URL=<postgres://user:pass@example.com:5432/dbname>
NODE_ENV=<development or production>
BOT_TOKEN=<token value>
BOT_CONSULTANT_USERNAME=<username to show bot users for questions>
OPENAI_ORGANIZATION_ID=<OpenAI Organization ID>
OPENAI_API_KEY=<OpenAI ApiKey>

# contacts list of Tg chat IDs to publish vacancies to
BOT_CONTACTS=<chatId1>,<chatId2>
Expand Down
2 changes: 2 additions & 0 deletions .env.testing
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ APP_PORT=3000
BOT_TOKEN=test-token:123
BOT_CONTACTS=chat1,chat2,chat3
BOT_CONSULTANT_USERNAME=test_username
OPENAI_ORGANIZATION_ID="test-org"
OPENAI_API_KEY="test-api-key"

MIN_PUBLISH_INTERVAL=2
PUBLISH_INTERVAL=1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm run prettier
- run: npm run prettier-check
- run: npm run lint
- run: npm test
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
BOT_CONSULTANT_USERNAME=<username to show bot users for questions>
DB_URL=<postgres://user:pass@example.com:5432/dbname>
DB_SSL_ENABLED=<boolean> # true, by default
OPENAI_ORGANIZATION_ID=<OpenAI Organisation ID>
OPENAI_API_KEY=<OpenAI ApiKey>

MIN_PUBLISH_INTERVAL=<number of hours> # the smallest interval between vacancy publishing, by default 2
PUBLISH_INTERVAL=<number of hours> # interval between vacancy publishing, by default 5
Expand All @@ -24,6 +26,8 @@
PUBLISH_CONFIG='{ "mon": [10,18], "tue": [10,18], "wed": [10,18], "thu": [10,18], "fri": [10,18] }' # daily publish config in format JSON<{ "week day": [from hours, to hours] }>
```

4. Start working with `npm run dev` for local development and `npm run start` for global work

### Getting started with docker-compose

You need docker-compose version 1.29
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ services:
- NODE_ENV=${NODE_ENV}
- BOT_TOKEN=${BOT_TOKEN}
- BOT_CONSULTANT_USERNAME=${BOT_CONSULTANT_USERNAME}
- OPENAI_ORGANIZATION_ID=${OPENAI_ORGANIZATION_ID}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- MIN_PUBLISH_INTERVAL=${MIN_PUBLISH_INTERVAL}
- PUBLISH_INTERVAL=${PUBLISH_INTERVAL}
- USER_MONTH_VACANCY_LIMIT=${USER_MONTH_VACANCY_LIMIT}
Expand Down
Loading