2023-08-04 22:07:22 +00:00
|
|
|
{ lib
|
2024-02-29 20:09:43 +00:00
|
|
|
, attr
|
2023-08-04 22:07:22 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-10-09 19:29:22 +00:00
|
|
|
, freezegun
|
2024-02-29 20:09:43 +00:00
|
|
|
, orjson
|
2023-08-04 22:07:22 +00:00
|
|
|
, poetry-core
|
|
|
|
, pydantic
|
|
|
|
, pytest-asyncio
|
2023-08-22 20:05:09 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2024-02-29 20:09:43 +00:00
|
|
|
, pythonRelaxDepsHook
|
2023-08-22 20:05:09 +00:00
|
|
|
, requests
|
2023-08-04 22:07:22 +00:00
|
|
|
}:
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
buildPythonPackage rec {
|
2023-08-04 22:07:22 +00:00
|
|
|
pname = "langsmith";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.1.10";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2023-08-04 22:07:22 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "langchain-ai";
|
2023-08-22 20:05:09 +00:00
|
|
|
repo = "langsmith-sdk";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-9My/0DPN6AwAFoAiTdl6jd2GtX4fpFIgpnZe/WzAi9c=";
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
sourceRoot = "${src.name}/python";
|
2023-08-04 22:07:22 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"orjson"
|
|
|
|
];
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
2024-02-29 20:09:43 +00:00
|
|
|
pythonRelaxDepsHook
|
2023-08-04 22:07:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2024-02-29 20:09:43 +00:00
|
|
|
orjson
|
2023-08-04 22:07:22 +00:00
|
|
|
pydantic
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2024-02-29 20:09:43 +00:00
|
|
|
attr
|
2023-10-09 19:29:22 +00:00
|
|
|
freezegun
|
2023-08-04 22:07:22 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
2023-08-22 20:05:09 +00:00
|
|
|
# These tests require network access
|
2023-08-04 22:07:22 +00:00
|
|
|
"integration_tests"
|
2023-11-16 04:20:00 +00:00
|
|
|
# due to circular import
|
|
|
|
"test_as_runnable"
|
|
|
|
"test_as_runnable_batch"
|
|
|
|
"test_as_runnable_async"
|
|
|
|
"test_as_runnable_async_batch"
|
2024-01-25 14:12:00 +00:00
|
|
|
# requires git repo
|
|
|
|
"test_git_info"
|
2024-02-29 20:09:43 +00:00
|
|
|
# Tests require OpenAI API key
|
|
|
|
"test_chat_async_api"
|
|
|
|
"test_chat_sync_api"
|
|
|
|
"test_completions_async_api"
|
|
|
|
"test_completions_sync_api"
|
2023-11-16 04:20:00 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# due to circular import
|
|
|
|
"tests/integration_tests/test_client.py"
|
2024-02-29 20:09:43 +00:00
|
|
|
"tests/unit_tests/test_client.py"
|
2023-08-04 22:07:22 +00:00
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"langsmith"
|
|
|
|
];
|
2023-08-04 22:07:22 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform";
|
2023-08-22 20:05:09 +00:00
|
|
|
homepage = "https://github.com/langchain-ai/langsmith-sdk";
|
|
|
|
changelog = "https://github.com/langchain-ai/langsmith-sdk/releases/tag/v${version}";
|
2023-08-04 22:07:22 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ natsukium ];
|
|
|
|
};
|
|
|
|
}
|