Skip to content

Commit

Permalink
Merge branch 'master' into falkordbchatmessagehistorycreation
Browse files Browse the repository at this point in the history
  • Loading branch information
efriis authored Dec 4, 2024
2 parents 2d7e138 + eff8a54 commit 6fdb10a
Show file tree
Hide file tree
Showing 65 changed files with 5,161 additions and 2,687 deletions.
11 changes: 1 addition & 10 deletions .github/scripts/check_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,8 @@
"huggingface",
]

# Cap python version at 3.12 for some packages with dependencies that are not yet
# compatible with python 3.13 (mostly hf tokenizers).
PY_312_MAX_PACKAGES = [
f"libs/partners/{integration}"
for integration in [
"couchbase",
"huggingface",
"mistralai",
"nomic",
"qdrant",
]
"libs/partners/huggingface", # https://github.com/pytorch/pytorch/issues/130249
]


Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/_compile_integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ on:
description: "Python version to use"

env:
POETRY_VERSION: "1.7.1"
POETRY_VERSION: "1.8.4"

jobs:
build:
defaults:
run:
working-directory: ${{ inputs.working-directory }}
runs-on: ubuntu-latest
timeout-minutes: 20
name: "poetry run pytest -m compile tests/integration_tests #${{ inputs.python-version }}"
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
description: "Python version to use"

env:
POETRY_VERSION: "1.7.1"
POETRY_VERSION: "1.8.4"

jobs:
build:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
description: "Python version to use"

env:
POETRY_VERSION: "1.7.1"
POETRY_VERSION: "1.8.4"
WORKDIR: ${{ inputs.working-directory == '' && '.' || inputs.working-directory }}

# This env var allows us to get inline annotations when ruff has complaints.
Expand All @@ -23,6 +23,7 @@ jobs:
build:
name: "make lint #${{ inputs.python-version }}"
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:

env:
PYTHON_VERSION: "3.11"
POETRY_VERSION: "1.7.1"
POETRY_VERSION: "1.8.4"

jobs:
build:
Expand Down Expand Up @@ -167,6 +167,7 @@ jobs:
- release-notes
- test-pypi-publish
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ on:
description: "Python version to use"

env:
POETRY_VERSION: "1.7.1"
POETRY_VERSION: "1.8.4"

jobs:
build:
defaults:
run:
working-directory: ${{ inputs.working-directory }}
runs-on: ubuntu-latest
timeout-minutes: 20
name: "make test #${{ inputs.python-version }}"
steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/_test_doc_imports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ on:
description: "Python version to use"

env:
POETRY_VERSION: "1.7.1"
POETRY_VERSION: "1.8.4"

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
name: "check doc imports #${{ inputs.python-version }}"
steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/_test_pydantic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ on:
description: "Pydantic version to test."

env:
POETRY_VERSION: "1.7.1"
POETRY_VERSION: "1.8.4"

jobs:
build:
defaults:
run:
working-directory: ${{ inputs.working-directory }}
runs-on: ubuntu-latest
timeout-minutes: 20
name: "make test # pydantic: ~=${{ inputs.pydantic-version }}, python: ${{ inputs.python-version }}, "
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_test_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
description: "Release from a non-master branch (danger!)"

env:
POETRY_VERSION: "1.7.1"
POETRY_VERSION: "1.8.4"
PYTHON_VERSION: "3.10"

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/api_doc_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
schedule:
- cron: '0 13 * * *'
env:
POETRY_VERSION: "1.8.1"
POETRY_VERSION: "1.8.4"
PYTHON_VERSION: "3.11"

jobs:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/check_diffs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:
cancel-in-progress: true

env:
POETRY_VERSION: "1.7.1"
POETRY_VERSION: "1.8.4"

jobs:
build:
Expand Down Expand Up @@ -119,6 +119,7 @@ jobs:
job-configs: ${{ fromJson(needs.build.outputs.extended-tests) }}
fail-fast: false
runs-on: ubuntu-latest
timeout-minutes: 20
defaults:
run:
working-directory: ${{ matrix.job-configs.working-directory }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
- cron: '0 13 * * *'

env:
POETRY_VERSION: "1.7.1"
POETRY_VERSION: "1.8.4"

jobs:
build:
Expand Down
64 changes: 51 additions & 13 deletions .github/workflows/scheduled_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,70 @@ name: Scheduled tests

on:
workflow_dispatch: # Allows to trigger the workflow manually in GitHub UI
inputs:
working-directory-force:
type: string
description: "From which folder this pipeline executes - defaults to all in matrix - example value: libs/partners/anthropic"
python-version-force:
type: string
description: "Python version to use - defaults to 3.9 and 3.11 in matrix - example value: 3.9"
schedule:
- cron: '0 13 * * *'

env:
POETRY_VERSION: "1.7.1"
POETRY_VERSION: "1.8.4"
DEFAULT_LIBS: >
[
"libs/partners/openai",
"libs/partners/anthropic",
"libs/partners/fireworks",
"libs/partners/groq",
"libs/partners/mistralai",
"libs/partners/google-vertexai",
"libs/partners/google-genai",
"libs/partners/aws"
]
jobs:
compute-matrix:
if: github.repository_owner == 'langchain-ai' || github.event_name != 'schedule'
runs-on: ubuntu-latest
name: Compute matrix
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Set matrix
id: set-matrix
env:
DEFAULT_LIBS: ${{ env.DEFAULT_LIBS }}
WORKING_DIRECTORY_FORCE: ${{ github.event.inputs.working-directory-force || '' }}
PYTHON_VERSION_FORCE: ${{ github.event.inputs.python-version-force || '' }}
run: |
# echo "matrix=..." where matrix is a json formatted str with keys python-version and working-directory
# python-version should default to 3.9 and 3.11, but is overridden to [PYTHON_VERSION_FORCE] if set
# working-directory should default to DEFAULT_LIBS, but is overridden to [WORKING_DIRECTORY_FORCE] if set
python_version='["3.9", "3.11"]'
working_directory="$DEFAULT_LIBS"
if [ -n "$PYTHON_VERSION_FORCE" ]; then
python_version="[\"$PYTHON_VERSION_FORCE\"]"
fi
if [ -n "$WORKING_DIRECTORY_FORCE" ]; then
working_directory="[\"$WORKING_DIRECTORY_FORCE\"]"
fi
matrix="{\"python-version\": $python_version, \"working-directory\": $working_directory}"
echo $matrix
echo "matrix=$matrix" >> $GITHUB_OUTPUT
build:
if: github.repository_owner == 'langchain-ai' || github.event_name != 'schedule'
name: Python ${{ matrix.python-version }} - ${{ matrix.working-directory }}
runs-on: ubuntu-latest
needs: [compute-matrix]
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.11"
working-directory:
- "libs/partners/openai"
- "libs/partners/anthropic"
- "libs/partners/fireworks"
- "libs/partners/groq"
- "libs/partners/mistralai"
- "libs/partners/google-vertexai"
- "libs/partners/google-genai"
- "libs/partners/aws"
python-version: ${{ fromJSON(needs.compute-matrix.outputs.matrix).python-version }}
working-directory: ${{ fromJSON(needs.compute-matrix.outputs.matrix).working-directory }}

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/how_to/graph_constructing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
" allowed_nodes=[\"Person\", \"Country\", \"Organization\"],\n",
" allowed_relationships=allowed_relationships,\n",
")\n",
"llm_transformer_tuple = llm_transformer_filtered.convert_to_graph_documents(documents)\n",
"graph_documents_filtered = llm_transformer_tuple.convert_to_graph_documents(documents)\n",
"print(f\"Nodes:{graph_documents_filtered[0].nodes}\")\n",
"print(f\"Relationships:{graph_documents_filtered[0].relationships}\")"
]
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/integrations/chat/mistralai.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"### Credentials\n",
"\n",
"\n",
"A valid [API key](https://console.mistral.ai/users/api-keys/) is needed to communicate with the API. Once you've done this set the MISTRAL_API_KEY environment variable:"
"A valid [API key](https://console.mistral.ai/api-keys/) is needed to communicate with the API. Once you've done this set the MISTRAL_API_KEY environment variable:"
]
},
{
Expand Down
Loading

0 comments on commit 6fdb10a

Please sign in to comment.