Unverified Commit 27e5b191 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

python3Packages.langchain-google-genai: fixes (#497099)

parents 81559d61 e89680a3
Loading
Loading
Loading
Loading
+10 −11
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@
  gitUpdater,
}:

buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
  pname = "langchain-google-genai";
  version = "4.2.1";
  pyproject = true;
@@ -35,20 +35,14 @@ buildPythonPackage rec {
  src = fetchFromGitHub {
    owner = "langchain-ai";
    repo = "langchain-google";
    tag = "libs/genai/v${version}";
    tag = "libs/genai/v${finalAttrs.version}";
    hash = "sha256-aNmYj5eOWDgHYlSLElwQXQByQg8gHqiybM19JQlkluk=";
  };

  sourceRoot = "${src.name}/libs/genai";
  sourceRoot = "${finalAttrs.src.name}/libs/genai";

  build-system = [ hatchling ];

  pythonRelaxDeps = [
    # Each component release requests the exact latest core.
    # That prevents us from updating individual components.
    "langchain-core"
  ];

  dependencies = [
    filetype
    google-api-core
@@ -76,6 +70,11 @@ buildPythonPackage rec {
    "test_serialize"
  ];

  disabledTestPaths = [
    # AssertionError: assert {'google_maps...s': None, ...} == {'google_maps...a'...
    "tests/unit_tests/test_chat_models.py::test_response_to_result_grounding_metadata[raw_response0-expected_grounding_metadata0]"
  ];

  pythonImportsCheck = [ "langchain_google_genai" ];

  passthru = {
@@ -87,7 +86,7 @@ buildPythonPackage rec {
  };

  meta = {
    changelog = "https://github.com/langchain-ai/langchain-google/releases/tag/${src.tag}";
    changelog = "https://github.com/langchain-ai/langchain-google/releases/tag/${finalAttrs.src.tag}";
    description = "LangChain integrations for Google Gemini";
    homepage = "https://github.com/langchain-ai/langchain-google/tree/main/libs/genai";
    license = lib.licenses.mit;
@@ -96,4 +95,4 @@ buildPythonPackage rec {
      sarahec
    ];
  };
}
})