From 2fed625458215c1305d31a250c7cb292e1c61813 Mon Sep 17 00:00:00 2001 From: Simon Ilyushchenko Date: Fri, 29 Dec 2023 12:14:19 -0800 Subject: [PATCH 1/6] Break code to see how tests run --- packages/jupyter-ai-magics/jupyter_ai_magics/providers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py index eb6495f6b..a706e679c 100644 --- a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py +++ b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py @@ -1,3 +1,4 @@ +foo import asyncio import base64 import copy From c5006f0fc4cbbf683bbead31172e649d46dbff07 Mon Sep 17 00:00:00 2001 From: Simon Ilyushchenko Date: Fri, 29 Dec 2023 13:41:44 -0800 Subject: [PATCH 2/6] Add langchain_google_genai dependency --- packages/jupyter-ai-magics/pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/jupyter-ai-magics/pyproject.toml b/packages/jupyter-ai-magics/pyproject.toml index 05e11a10d..1abf1bc1c 100644 --- a/packages/jupyter-ai-magics/pyproject.toml +++ b/packages/jupyter-ai-magics/pyproject.toml @@ -27,6 +27,7 @@ dependencies = [ "typing_extensions>=4.5.0", "click~=8.0", "jsonpath-ng>=1.5.3,<2", + "langchain_google_genai", ] [project.optional-dependencies] From 2fa0ec93c7bc86b887c660d823eb4acdb9864cb0 Mon Sep 17 00:00:00 2001 From: Simon Ilyushchenko Date: Fri, 29 Dec 2023 13:43:12 -0800 Subject: [PATCH 3/6] Add langchain Google import --- packages/jupyter-ai-magics/jupyter_ai_magics/providers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py index a706e679c..78bd921ee 100644 --- a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py +++ b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py @@ -1,4 +1,3 @@ -foo import asyncio import base64 import copy @@ -27,6 +26,7 @@ QianfanChatEndpoint, ) from langchain.chat_models.base import BaseChatModel +from langchain_google_genai import ChatGoogleGenerativeAI from langchain.llms import ( AI21, Anthropic, From 0108860ab279dd8b501e38251f813f8cdfe3b98d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 29 Dec 2023 21:43:51 +0000 Subject: [PATCH 4/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- packages/jupyter-ai-magics/jupyter_ai_magics/providers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py index 78bd921ee..7781799c7 100644 --- a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py +++ b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py @@ -26,7 +26,6 @@ QianfanChatEndpoint, ) from langchain.chat_models.base import BaseChatModel -from langchain_google_genai import ChatGoogleGenerativeAI from langchain.llms import ( AI21, Anthropic, @@ -45,6 +44,7 @@ from langchain.pydantic_v1 import BaseModel, Extra, root_validator from langchain.schema import LLMResult from langchain.utils import get_from_dict_or_env +from langchain_google_genai import ChatGoogleGenerativeAI class EnvAuthStrategy(BaseModel): From ac151b167135d1261f73bd8371e3aa7edacb3399 Mon Sep 17 00:00:00 2001 From: Simon Ilyushchenko Date: Fri, 29 Dec 2023 13:52:51 -0800 Subject: [PATCH 5/6] Enable actions on workflow dispatch --- .../.github/workflows/binder-on-pr.yml | 1 + .../.github/workflows/build.yml | 1 + .../.github/workflows/check-release.yml | 1 + .../.github/workflows/update-integration-tests.yml | 1 + 4 files changed, 4 insertions(+) diff --git a/packages/jupyter-ai-module-cookiecutter/{{cookiecutter.labextension_name}}/.github/workflows/binder-on-pr.yml b/packages/jupyter-ai-module-cookiecutter/{{cookiecutter.labextension_name}}/.github/workflows/binder-on-pr.yml index 5d7944bb6..a4ebd926a 100644 --- a/packages/jupyter-ai-module-cookiecutter/{{cookiecutter.labextension_name}}/.github/workflows/binder-on-pr.yml +++ b/packages/jupyter-ai-module-cookiecutter/{{cookiecutter.labextension_name}}/.github/workflows/binder-on-pr.yml @@ -3,6 +3,7 @@ name: Binder Badge on: pull_request_target: types: [opened] + workflow_dispatch: permissions: pull-requests: write diff --git a/packages/jupyter-ai-module-cookiecutter/{{cookiecutter.labextension_name}}/.github/workflows/build.yml b/packages/jupyter-ai-module-cookiecutter/{{cookiecutter.labextension_name}}/.github/workflows/build.yml index 0706fd9a5..eec18dad3 100644 --- a/packages/jupyter-ai-module-cookiecutter/{{cookiecutter.labextension_name}}/.github/workflows/build.yml +++ b/packages/jupyter-ai-module-cookiecutter/{{cookiecutter.labextension_name}}/.github/workflows/build.yml @@ -5,6 +5,7 @@ on: branches: main pull_request: branches: '*' + workflow_dispatch: jobs: build: diff --git a/packages/jupyter-ai-module-cookiecutter/{{cookiecutter.labextension_name}}/.github/workflows/check-release.yml b/packages/jupyter-ai-module-cookiecutter/{{cookiecutter.labextension_name}}/.github/workflows/check-release.yml index ad19ee9da..83a2a26ac 100644 --- a/packages/jupyter-ai-module-cookiecutter/{{cookiecutter.labextension_name}}/.github/workflows/check-release.yml +++ b/packages/jupyter-ai-module-cookiecutter/{{cookiecutter.labextension_name}}/.github/workflows/check-release.yml @@ -4,6 +4,7 @@ on: branches: ["main"] pull_request: branches: ["*"] + workflow_dispatch: jobs: check_release: diff --git a/packages/jupyter-ai-module-cookiecutter/{{cookiecutter.labextension_name}}/.github/workflows/update-integration-tests.yml b/packages/jupyter-ai-module-cookiecutter/{{cookiecutter.labextension_name}}/.github/workflows/update-integration-tests.yml index df49004e6..fcf1d738d 100644 --- a/packages/jupyter-ai-module-cookiecutter/{{cookiecutter.labextension_name}}/.github/workflows/update-integration-tests.yml +++ b/packages/jupyter-ai-module-cookiecutter/{{cookiecutter.labextension_name}}/.github/workflows/update-integration-tests.yml @@ -3,6 +3,7 @@ name: Update Playwright Snapshots on: issue_comment: types: [created, edited] + workflow_dispatch: permissions: contents: write From adfcf559e42974a0509aa19516306c4f46c083c2 Mon Sep 17 00:00:00 2001 From: Simon Ilyushchenko Date: Fri, 29 Dec 2023 13:56:37 -0800 Subject: [PATCH 6/6] Break code again --- packages/jupyter-ai-magics/jupyter_ai_magics/providers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py index 78bd921ee..09b64d599 100644 --- a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py +++ b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py @@ -1,3 +1,4 @@ +bar import asyncio import base64 import copy