python3Packages.langchain-xai: init at 0.2.3 (#403128)
This commit is contained in:
@@ -18,6 +18,7 @@ declare -ar packages=(
|
||||
langchain-openai
|
||||
langchain-tests
|
||||
langchain-text-splitters
|
||||
langchain-xai
|
||||
)
|
||||
|
||||
tags=$(git ls-remote --tags --refs "https://github.com/langchain-ai/langchain" | cut --delimiter=/ --field=3-)
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
nix-update-script,
|
||||
|
||||
# build-system
|
||||
pdm-backend,
|
||||
|
||||
# dependencies
|
||||
aiohttp,
|
||||
langchain-core,
|
||||
langchain-openai,
|
||||
requests,
|
||||
|
||||
# tests
|
||||
langchain-tests,
|
||||
pytest-asyncio,
|
||||
pytest-mock,
|
||||
pytestCheckHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "langchain-xai";
|
||||
version = "0.2.3";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "langchain-ai";
|
||||
repo = "langchain";
|
||||
tag = "langchain-xai==${version}";
|
||||
hash = "sha256-9pSwEHqh+WkHsjn7JNsyEy+U67ekTqAdHMAvAFanR8w=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/libs/partners/xai";
|
||||
|
||||
build-system = [ pdm-backend ];
|
||||
|
||||
dependencies = [
|
||||
aiohttp
|
||||
langchain-core
|
||||
langchain-openai
|
||||
requests
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
# Each component release requests the exact latest core.
|
||||
# That prevents us from updating individual components.
|
||||
"langchain-core"
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
langchain-tests
|
||||
pytest-asyncio
|
||||
pytest-mock
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pytestFlagsArray = [ "tests/unit_tests" ];
|
||||
|
||||
pythonImportsCheck = [ "langchain_xai" ];
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--version-regex"
|
||||
"langchain-xai==([0-9.]+)"
|
||||
];
|
||||
};
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/langchain-ai/langchain-xai/releases/tag/langchain-xai==${version}";
|
||||
description = "Build LangChain applications with X AI";
|
||||
homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/xai";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [
|
||||
lib.maintainers.sarahec
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -7554,6 +7554,8 @@ self: super: with self; {
|
||||
|
||||
langchain-text-splitters = callPackage ../development/python-modules/langchain-text-splitters { };
|
||||
|
||||
langchain-xai = callPackage ../development/python-modules/langchain-xai { };
|
||||
|
||||
langcodes = callPackage ../development/python-modules/langcodes { };
|
||||
|
||||
langdetect = callPackage ../development/python-modules/langdetect { };
|
||||
|
||||
Reference in New Issue
Block a user