From 5103cdf48b725b5a45d5905c76ac6ed2cbbf2b56 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 23 Jul 2023 21:43:19 +0900 Subject: [PATCH] python310Packages.langsmith: init at 0.0.14 --- .../python-modules/langsmith/default.nix | 54 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 56 insertions(+) create mode 100644 pkgs/development/python-modules/langsmith/default.nix diff --git a/pkgs/development/python-modules/langsmith/default.nix b/pkgs/development/python-modules/langsmith/default.nix new file mode 100644 index 00000000000..af1a1c1afea --- /dev/null +++ b/pkgs/development/python-modules/langsmith/default.nix @@ -0,0 +1,54 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pydantic +, requests +, pytestCheckHook +, pytest-asyncio +}: + +buildPythonPackage { + pname = "langsmith"; + version = "0.0.14"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "langchain-ai"; + repo = "langchainplus-sdk"; + # there are no correct tags + # https://github.com/langchain-ai/langchainplus-sdk/issues/105 + rev = "092f67222e4beabca0f51ba03f1ee028f916da63"; + hash = "sha256-U8fs16Uq80EB7Ey5YuQhUKKI9DOXJWlabM5JdoDnWP0="; + }; + + sourceRoot = "source/python"; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + pydantic + requests + ]; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + disabledTests = [ + # these tests require network access + "integration_tests" + ]; + + pythonImportsCheck = [ "langsmith" ]; + + meta = with lib; { + description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform"; + homepage = "https://github.com/langchain-ai/langchainplus-sdk"; + license = licenses.mit; + maintainers = with maintainers; [ natsukium ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3fcb689e147..dfef356b4e6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5678,6 +5678,8 @@ self: super: with self; { langdetect = callPackage ../development/python-modules/langdetect { }; + langsmith = callPackage ../development/python-modules/langsmith { }; + language-data = callPackage ../development/python-modules/language-data { }; language-tags = callPackage ../development/python-modules/language-tags { };