Skip to content

Commit

Permalink
fix: add missing callback method to base callback handler class (#189)
Browse files Browse the repository at this point in the history
* ⬆️ upgrade dependencies

* 🔧 pre-commit autoupdate

* 🙈 update .gitignore

* ➖ remove prettier hook

* 🔧 fix ruff warning

* ⚡ add `on_chat_model_start` callback method

* bump(ver): 0.8.5 → 0.8.6

* 🙈 update .gitignore
  • Loading branch information
ajndkr authored Mar 23, 2024
1 parent 64215d9 commit 1c2e4dc
Show file tree
Hide file tree
Showing 5 changed files with 150 additions and 154 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
untracked/
.flake8

# Created by https://www.toptal.com/developers/gitignore/api/macos,python,visualstudiocode
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,python,visualstudiocode
Expand Down
9 changes: 2 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ repos:
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/psf/black
rev: 24.2.0
rev: 24.3.0
hooks:
- id: black

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.3.0
rev: v0.3.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -41,8 +41,3 @@ repos:
hooks:
- id: isort
args: [--profile, black]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
2 changes: 2 additions & 0 deletions lanarky/adapters/langchain/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def always_verbose(self) -> bool:
"""Verbose mode is always enabled for Lanarky applications."""
return True

async def on_chat_model_start(self, *args: Any, **kwargs: Any) -> Any: ...


class StreamingCallbackHandler(LanarkyCallbackHandler):
"""Callback handler for streaming responses."""
Expand Down
Loading

0 comments on commit 1c2e4dc

Please sign in to comment.