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

Fix CI #111

Closed
wants to merge 11 commits into from
Closed
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
3 changes: 1 addition & 2 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ jobs:
- name: Install poetry
run: |
python -m pip install poetry
poetry export --with dev --format=requirements.txt --output=requirements.txt
- name: set PY
run: echo "PY=$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- uses: pre-commit/action@v3.0.0
- uses: pre-commit/action@v3.0.1
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: mixed-line-ending
Expand All @@ -16,9 +16,9 @@ repos:
# - id: bandit
# exclude: tests/
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: v1.3.1
rev: v1.4.0
hooks:
- id: python-safety-dependencies-check
- id: python-safety-dependencies-check
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.13.0'
hooks:
Expand Down
1,659 changes: 823 additions & 836 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pydantic = ">=2,<3"
packaging = ">=23.2,<25.0"
openai = { version = "^1.12.0", optional = true }
mistralai = { version = ">=0.4.3,<2.0.0", optional = true }
anthropic = { version = "^0.29.0", optional = true }
anthropic = { version = "^0.40.0", optional = true }
cohere = {version = "^5.2.5", optional = true}
huggingface-hub = { version = "^0.22.2", optional = true }
tiktoken = { version = "^0.8.0", optional = true }
Expand All @@ -50,6 +50,7 @@ minijinja = { version = "^1.0.16", optional = true }
google-generativeai = { version = "^0.8.3", optional = true }
litellm = {version="^1.41.23", optional = true}
rapidfuzz = {version = "^3.9.6", optional = true}
pre-commit = "^4.1.0"

[tool.poetry.extras]
openai = ["openai"]
Expand All @@ -65,7 +66,6 @@ google-generativeai = ["google-generativeai"]
optional = true

[tool.poetry.group.dev.dependencies]
pre-commit = "^2.20.0"
pytest = "^7.2.0"
# ruff = "^0.0.254"
pytest-recording = "^0.13.1"
Expand Down
58 changes: 36 additions & 22 deletions tests/cassettes/test_anthropic/test_anthropic_async_chat.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
interactions:
- request:
body: '{"max_tokens": 100, "messages": [{"role": "user", "content": "Hello World!"}],
"model": "claude-3-5-sonnet-20240620"}'
body: '{"max_tokens":100,"messages":[{"role":"user","content":"Hello World!"}],"model":"claude-3-5-sonnet-20240620"}'
headers:
accept:
- application/json
Expand All @@ -12,13 +11,13 @@ interactions:
connection:
- keep-alive
content-length:
- '117'
- '109'
content-type:
- application/json
host:
- api.anthropic.com
user-agent:
- AsyncAnthropic/Python 0.29.0
- AsyncAnthropic/Python 0.40.0
x-stainless-arch:
- arm64
x-stainless-async:
Expand All @@ -28,56 +27,71 @@ interactions:
x-stainless-os:
- MacOS
x-stainless-package-version:
- 0.29.0
- 0.40.0
x-stainless-retry-count:
- '0'
x-stainless-runtime:
- CPython
x-stainless-runtime-version:
- 3.11.8
- 3.13.1
method: POST
uri: https://api.anthropic.com/v1/messages
response:
body:
string: !!binary |
H4sIAAAAAAAAA1SPvU7DQBCEX+WYhuaMHAeIcg0NIj8lKDQIWSd7FZmcd41vT8Gy/O7IAQqqkb6d
mdWMaGo4tPFY5otDvVw90v6ZTq+bQ1pv9k8vq/MHLHToaHZRjP5IsOglzMDH2ET1rLBopaYAhyr4
VFO2zO6yKMykWZEXt/l9kcOiElZihXsb/0qVvub4RRy2FIJcmZ1eR8NNRUbFtERqBkk3ZitnU3k2
O/PzeaZGpfbDA6Z3i6jSlT35KAwH4rrU1DN+D5E+E3FFcJxCsEiXMW5Ew13SUuVEHOEWuYUk/YfW
0/QNAAD//wMAQVyCRCoBAAA=
H4sIAAAAAAAAA2SQPW/CQAyG/4rrhSWgQGmHLF1QBQNSu7aqoiMx4ZSLDbGvECH+e3X0Q606WXre
D8s+o6+xwE6bMp8+LZvjYfq8WaxfusVpY837duA1ZmjDnpKLVF1DmGEvIQGn6tUcG2bYSU0BC6yC
izWNb8d3YxVmsvEsn83z+1mOGVbCRmxYvJ6/S41OKX4dBS4pBLmBlY0Ump6cgQl0RAaDxAks5QiV
Y1jB5+pEwaR2wwM8EgXY9kQp4rSFjsDxAIdIal5YQXoIZIm3LEfwW7Ad9TTS5LOd5yb1jWoIvr22
1F6rqDrBy1uGarIve3IqjAUS16XFnvFLUDpE4oqw4BhChvH6qeKMnvfRSpOWWLGY5hlWrtpRWaXr
vHD51/Cj9+Tq/5pE+03m+eXyAQAA//8DAOn2mVzDAQAA
headers:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 896c7b4cbce36698-AMS
- 90d52d0b78e7b71d-BRU
Connection:
- keep-alive
Content-Encoding:
- gzip
Content-Type:
- application/json
Date:
- Thu, 20 Jun 2024 14:34:48 GMT
- Wed, 05 Feb 2025 19:06:09 GMT
Server:
- cloudflare
Transfer-Encoding:
- chunked
X-Robots-Tag:
- none
anthropic-ratelimit-input-tokens-limit:
- '20000'
anthropic-ratelimit-input-tokens-remaining:
- '20000'
anthropic-ratelimit-input-tokens-reset:
- '2025-02-05T19:06:08Z'
anthropic-ratelimit-output-tokens-limit:
- '4000'
anthropic-ratelimit-output-tokens-remaining:
- '4000'
anthropic-ratelimit-output-tokens-reset:
- '2025-02-05T19:06:09Z'
anthropic-ratelimit-requests-limit:
- '5'
anthropic-ratelimit-requests-remaining:
- '3'
anthropic-ratelimit-requests-reset:
- '2024-06-20T14:35:43Z'
- '2025-02-05T19:06:31Z'
anthropic-ratelimit-tokens-limit:
- '20000'
- '24000'
anthropic-ratelimit-tokens-remaining:
- '20000'
- '24000'
anthropic-ratelimit-tokens-reset:
- '2024-06-20T14:35:43Z'
- '2025-02-05T19:06:08Z'
cf-cache-status:
- DYNAMIC
request-id:
- req_01DEDHPEgdPDVat6fFnc8Wwd
- req_01Ua2Vxrpz6J38ZmtjomTUk5
via:
- 1.1 google
x-cloud-trace-context:
- 52d0c3026f668f835588d12d7ade32ab
status:
code: 200
message: OK
Expand Down
Loading
Loading