Skip to content

Commit

Permalink
update langchain test
Browse files Browse the repository at this point in the history
Signed-off-by: Prithvi Kannan <[email protected]>
  • Loading branch information
prithvikannan committed Oct 24, 2024
1 parent 4076c00 commit aa4f3d1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,24 @@ jobs:
- name: Run tests
run: |
pytest tests/
langchain_test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install .
pip install integrations/langchain[dev]
- name: Run tests
run: |
pytest integrations/langchain/tests
1 change: 0 additions & 1 deletion integrations/langchain/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ dev = [
"typing_extensions",
"databricks-sdk>=0.34.0",
"ruff==0.6.4",
"langgraph",
]

[build-system]
Expand Down
4 changes: 2 additions & 2 deletions integrations/langchain/tests/test_genie.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from unittest.mock import patch

from langchain_core.messages import AIMessage
from my_module import _concat_messages_array, _query_genie_as_agent, create_genie_agent
from databricks_langchain.genie import _concat_messages_array, _query_genie_as_agent, create_genie_agent


def test_concat_messages_array():
Expand Down Expand Up @@ -35,7 +35,7 @@ def __init__(self, role, content):
assert result == expected


@patch("databricks_ai_bridge.genie.Genie")
@patch("databricks_langchain.genie.Genie")
def test_query_genie_as_agent(MockGenie):
# Mock the Genie class and its response
mock_genie = MockGenie.return_value
Expand Down

0 comments on commit aa4f3d1

Please sign in to comment.