Skip to content

Commit b1b2146

Browse files
committed
Locally store tiktoken encoding
1 parent 9bdeb58 commit b1b2146

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,10 @@ jobs:
462462
env:
463463
GROUP_NUMBER: ${{ matrix.group-number }}
464464

465+
- name: Set up Tiktoken Cache
466+
run: |
467+
mkdir -p /github/home/.tiktoken_cache
468+
curl -L https://openaipublic.blob.core.windows.net/encodings/cl100k_base.tiktoken -o .tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4
465469
- name: Test
466470
run: |
467471
tox run-parallel \

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ setenv =
499499
TOX_ENV_DIR={envdir}
500500
COVERAGE_FILE={envdir}/.coverage.{envname}
501501
COVERAGE_RCFILE={toxinidir}/tox.ini
502+
TIKTOKEN_CACHE_DIR=/github/home/.tiktoken_cache
502503
with_extensions: NEW_RELIC_EXTENSIONS = true
503504
without_extensions: NEW_RELIC_EXTENSIONS = false
504505
agent_features: NEW_RELIC_APDEX_T = 1000

0 commit comments

Comments
 (0)