Skip to content

Commit

Permalink
0.13.0: Increased chunk size for code and added auto-URL upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
flavienbwk committed Sep 8, 2024
1 parent ac74c09 commit 4722dfb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ jobs:
provider_project_id: ${{ secrets.PROVIDER_PROJECT_ID }}
provider_default_region: 'fr-par'
provider_default_zone: 'fr-par-2'

- name: Get repochat domain
run: echo "DOMAIN=${{ steps.deploy_repochat.outputs.domain }}" >> $GITHUB_OUTPUT
id: repochat_domain

- name: Set repo URL
run: |
REPO_URL="https://github.com/${{ github.repository }}"
curl -X POST "$DOMAIN/api/set-repo-url" \
-H "Content-Type: application/json" \
-d "{\"repoUrl\": \"$REPO_URL\"}"
2 changes: 1 addition & 1 deletion api/api_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def split_docs(self, docs):
processed_docs.append(doc)

splitter = RecursiveCharacterTextSplitter(
chunk_size=512,
chunk_size=2048,
chunk_overlap=20,
separators=["\n\n", "\n", "(?<=\. )", " ", ""],
)
Expand Down
2 changes: 1 addition & 1 deletion api/dir_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def split_docs(self, docs):
# RecursiveTextSplitter
# Chunk size big enough
splitter = RecursiveCharacterTextSplitter(
chunk_size=512,
chunk_size=2048,
chunk_overlap=20,
separators=["\n\n", "\n", "(?<=\. )", " ", ""],
)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gh-action-repochat",
"version": "0.12.0",
"version": "0.13.0",
"type": "module",
"description": "GitHub Action to run repochat",
"main": "index.js",
Expand Down

0 comments on commit 4722dfb

Please sign in to comment.