Merge pull request #287983 from fabaff/openai-fix

python311Packages.openai: 1.11.0 -> 1.12.0

authored by Fabian Affolter and committed by GitHub 939ae61d 0b30e6db

+310 -66
+2 -1
pkgs/applications/misc/shell-genie/default.nix
··· 8 8 buildPythonPackage rec { 9 9 pname = "shell-genie"; 10 10 version = "0.2.10"; 11 - format = "pyproject"; 11 + pyproject = true; 12 12 13 13 src = fetchPypi { 14 14 pname = "shell_genie"; ··· 17 17 }; 18 18 19 19 pythonRelaxDeps = [ 20 + "openai" 20 21 "typer" 21 22 ]; 22 23
+21 -17
pkgs/development/python-modules/click-default-group/default.nix
··· 1 1 { lib 2 2 , buildPythonPackage 3 + , click 3 4 , fetchFromGitHub 4 - , fetchpatch 5 - , click 6 5 , pytestCheckHook 6 + , pythonOlder 7 + , flit-core 7 8 }: 8 9 9 10 buildPythonPackage rec { 10 11 pname = "click-default-group"; 11 - version = "1.2.2"; 12 - format = "setuptools"; 12 + version = "1.2.4"; 13 + pyproject = true; 14 + 15 + disabled = pythonOlder "3.7"; 13 16 14 - # No tests in Pypi tarball 15 17 src = fetchFromGitHub { 16 18 owner = "click-contrib"; 17 19 repo = "click-default-group"; 18 - rev = "v${version}"; 19 - sha256 = "0nk39lmkn208w8kvq6f4h3a6qzxrrvxixahpips6ik3zflbkss86"; 20 + rev = "refs/tags/v${version}"; 21 + hash = "sha256-9Vk4LdgLDAWG2YCQPLKR6PIVnULmpOoe7RtS8DgWARo="; 20 22 }; 21 23 22 - patches = [ 23 - # make tests compatible with click 8 24 - (fetchpatch { 25 - url = "https://github.com/click-contrib/click-default-group/commit/9415c77d05cf7d16876e7d70a49a41a6189983b4.patch"; 26 - sha256 = "1czzma8nmwyxhwhnr8rfw5bjw6d46b3s5r5bfb8ly3sjwqjlwhw2"; 27 - }) 24 + nativeBuildInputs = [ 25 + flit-core 28 26 ]; 29 27 30 - propagatedBuildInputs = [ click ]; 28 + propagatedBuildInputs = [ 29 + click 30 + ]; 31 31 32 - nativeCheckInputs = [ pytestCheckHook ]; 32 + nativeCheckInputs = [ 33 + pytestCheckHook 34 + ]; 33 35 34 - pythonImportsCheck = [ "click_default_group" ]; 36 + pythonImportsCheck = [ 37 + "click_default_group" 38 + ]; 35 39 36 40 meta = with lib; { 37 - homepage = "https://github.com/click-contrib/click-default-group"; 38 41 description = "Group to invoke a command without explicit subcommand name"; 42 + homepage = "https://github.com/click-contrib/click-default-group"; 39 43 license = licenses.bsd3; 40 44 maintainers = with maintainers; [ jakewaksbaum ]; 41 45 };
+65
pkgs/development/python-modules/fastapi-sso/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , email-validator 4 + , fastapi 5 + , fetchFromGitHub 6 + , httpx 7 + , oauthlib 8 + , poetry-core 9 + , pydantic 10 + , pylint 11 + , pytest-asyncio 12 + , pytest-xdist 13 + , pytestCheckHook 14 + , pythonOlder 15 + }: 16 + 17 + buildPythonPackage rec { 18 + pname = "fastapi-sso"; 19 + version = "0.11.0"; 20 + pyproject = true; 21 + 22 + disabled = pythonOlder "3.8"; 23 + 24 + src = fetchFromGitHub { 25 + owner = "tomasvotava"; 26 + repo = "fastapi-sso"; 27 + rev = "refs/tags/${version}"; 28 + hash = "sha256-bz4rr7h90d/QkBBqQN1pLF8ANhOiq2v0Vv2pjBGpeTs="; 29 + }; 30 + 31 + postPatch = '' 32 + sed -i "/--cov/d" pyproject.toml 33 + ''; 34 + 35 + nativeBuildInputs = [ 36 + poetry-core 37 + ]; 38 + 39 + propagatedBuildInputs = [ 40 + fastapi 41 + httpx 42 + oauthlib 43 + pydantic 44 + pylint 45 + ]; 46 + 47 + nativeCheckInputs = [ 48 + email-validator 49 + pytest-asyncio 50 + pytest-xdist 51 + pytestCheckHook 52 + ]; 53 + 54 + pythonImportsCheck = [ 55 + "fastapi_sso" 56 + ]; 57 + 58 + meta = with lib; { 59 + description = "FastAPI plugin to enable SSO to most common providers (such as Facebook login, Google login and login via Microsoft Office 365 Account"; 60 + homepage = "https://github.com/tomasvotava/fastapi-sso"; 61 + changelog = "https://github.com/tomasvotava/fastapi-sso/releases/tag/${version}"; 62 + license = licenses.mit; 63 + maintainers = with maintainers; [ fab ]; 64 + }; 65 + }
+2 -2
pkgs/development/python-modules/langchain-community/default.nix
··· 17 17 18 18 buildPythonPackage rec { 19 19 pname = "langchain-community"; 20 - version = "0.0.16"; 20 + version = "0.0.19"; 21 21 pyproject = true; 22 22 23 23 disabled = pythonOlder "3.8"; ··· 25 25 src = fetchPypi { 26 26 pname = "langchain_community"; 27 27 inherit version; 28 - hash = "sha256-wGUSqTAToG+6dnnNWhJU/4uSfN3S0fvgzERL97vfC4w="; 28 + hash = "sha256-XRitnhiLEKq6Y2H7KnR88ptksh/7gGGTP+wJAYfKOcI="; 29 29 }; 30 30 31 31 nativeBuildInputs = [
+11 -3
pkgs/development/python-modules/langchain-core/default.nix
··· 8 8 , langsmith 9 9 , packaging 10 10 , pydantic 11 + , pythonRelaxDepsHook 11 12 , pyyaml 12 13 , requests 13 14 , tenacity ··· 15 16 16 17 buildPythonPackage rec { 17 18 pname = "langchain-core"; 18 - version = "0.1.16"; 19 + version = "0.1.22"; 19 20 pyproject = true; 20 21 21 22 disabled = pythonOlder "3.8"; ··· 23 24 src = fetchPypi { 24 25 pname = "langchain_core"; 25 26 inherit version; 26 - hash = "sha256-jLVG7tMYAJ7hqKOB0QgHTt3wOVrmHrJD2wDXbh4mXok="; 27 + hash = "sha256-3qwSs+QqCLu6oqz4PV+N0tVRMlbY2vDoU+nWj/TJnXk="; 27 28 }; 28 29 30 + pythonRelaxDeps = [ 31 + "langsmith" 32 + ]; 33 + 29 34 nativeBuildInputs = [ 30 35 poetry-core 36 + pythonRelaxDepsHook 31 37 ]; 32 38 33 39 propagatedBuildInputs = [ ··· 41 47 tenacity 42 48 ]; 43 49 44 - pythonImportsCheck = [ "langchain_core" ]; 50 + pythonImportsCheck = [ 51 + "langchain_core" 52 + ]; 45 53 46 54 # PyPI source does not have tests 47 55 doCheck = false;
+2 -2
pkgs/development/python-modules/langchain/default.nix
··· 52 52 53 53 buildPythonPackage rec { 54 54 pname = "langchain"; 55 - version = "0.1.1"; 55 + version = "0.1.6"; 56 56 pyproject = true; 57 57 58 58 disabled = pythonOlder "3.8"; ··· 61 61 owner = "langchain-ai"; 62 62 repo = "langchain"; 63 63 rev = "refs/tags/v${version}"; 64 - hash = "sha256-cQz4u6FeVZLNbix4pyc6ulfj+nb/tARMJniusy7Q46A="; 64 + hash = "sha256-DMUf1dW1/Xl8OKRDb2o9NFgFE4rEgsCBZEPejGz1tQQ="; 65 65 }; 66 66 67 67 sourceRoot = "${src.name}/libs/langchain";
+10 -2
pkgs/development/python-modules/langsmith/default.nix
··· 1 1 { lib 2 + , attr 2 3 , buildPythonPackage 3 4 , fetchFromGitHub 4 5 , freezegun ··· 12 13 13 14 buildPythonPackage rec { 14 15 pname = "langsmith"; 15 - version = "0.0.83"; 16 + version = "0.0.90"; 16 17 pyproject = true; 17 18 18 19 disabled = pythonOlder "3.8"; ··· 21 22 owner = "langchain-ai"; 22 23 repo = "langsmith-sdk"; 23 24 rev = "refs/tags/v${version}"; 24 - hash = "sha256-WRrwekh4pcn3I0U/A2Q91ePrRx2RUC3XX+z4bez0BzU="; 25 + hash = "sha256-YZykHDu++cEoLmV9PvzowA4j2UpteFJfzr6+3VlbPME="; 25 26 }; 26 27 27 28 sourceRoot = "${src.name}/python"; ··· 36 37 ]; 37 38 38 39 nativeCheckInputs = [ 40 + attr 39 41 freezegun 40 42 pytest-asyncio 41 43 pytestCheckHook ··· 51 53 "test_as_runnable_async_batch" 52 54 # requires git repo 53 55 "test_git_info" 56 + # Tests require OpenAI API key 57 + "test_chat_async_api" 58 + "test_chat_sync_api" 59 + "test_completions_async_api" 60 + "test_completions_sync_api" 54 61 ]; 55 62 56 63 disabledTestPaths = [ 57 64 # due to circular import 58 65 "tests/integration_tests/test_client.py" 66 + "tests/unit_tests/test_client.py" 59 67 ]; 60 68 61 69 pythonImportsCheck = [
+59 -19
pkgs/development/python-modules/litellm/default.nix
··· 1 1 { lib 2 + , aiohttp 3 + , apscheduler 4 + , azure-identity 5 + , azure-keyvault-secrets 6 + , backoff 2 7 , buildPythonPackage 8 + , click 9 + , fastapi 10 + , fastapi-sso 3 11 , fetchFromGitHub 4 - , poetry-core 12 + , google-cloud-kms 13 + , gunicorn 5 14 , importlib-metadata 15 + , jinja2 6 16 , openai 17 + , orjson 18 + , poetry-core 19 + , prisma 20 + , pyjwt 7 21 , python-dotenv 22 + , python-multipart 23 + , pythonOlder 24 + , pyyaml 25 + , requests 26 + , resend 27 + , rq 28 + , streamlit 8 29 , tiktoken 9 30 , tokenizers 10 - , click 11 - , jinja2 12 - , certifi 13 - , appdirs 14 - , aiohttp 31 + , uvicorn 15 32 }: 16 - let 17 - version = "1.23.0"; 18 - in 19 - buildPythonPackage { 33 + 34 + buildPythonPackage rec { 20 35 pname = "litellm"; 21 - inherit version; 36 + version = "1.23.9"; 22 37 pyproject = true; 38 + 39 + disabled = pythonOlder "3.8"; 23 40 24 41 src = fetchFromGitHub { 25 42 owner = "BerriAI"; 26 43 repo = "litellm"; 27 44 rev = "refs/tags/v${version}"; 28 - hash = "sha256-Pl3Fet0TvGrNHNw4ssUMqa+UhzBYgqTydNfD96TeY7I="; 45 + hash = "sha256-5VqYo9JhRwtPnk0z7w7jFKN8/E2JhZ50Zi4HgbFiyhE="; 29 46 }; 30 47 31 48 postPatch = '' ··· 37 54 ]; 38 55 39 56 propagatedBuildInputs = [ 57 + aiohttp 58 + click 59 + importlib-metadata 60 + jinja2 40 61 openai 62 + requests 41 63 python-dotenv 42 64 tiktoken 43 - importlib-metadata 44 65 tokenizers 45 - click 46 - jinja2 47 - certifi 48 - appdirs 49 - aiohttp 50 66 ]; 51 67 68 + passthru.optional-dependencies = { 69 + proxy = [ 70 + apscheduler 71 + backoff 72 + fastapi 73 + fastapi-sso 74 + gunicorn 75 + orjson 76 + pyjwt 77 + python-multipart 78 + pyyaml 79 + rq 80 + uvicorn 81 + ]; 82 + extra_proxy = [ 83 + azure-identity 84 + azure-keyvault-secrets 85 + google-cloud-kms 86 + prisma 87 + resend 88 + streamlit 89 + ]; 90 + }; 91 + 52 92 # the import check phase fails trying to do a network request to openai 53 93 # pythonImportsCheck = [ "litellm" ]; 54 94 ··· 58 98 meta = with lib; { 59 99 description = "Use any LLM as a drop in replacement for gpt-3.5-turbo. Use Azure, OpenAI, Cohere, Anthropic, Ollama, VLLM, Sagemaker, HuggingFace, Replicate (100+ LLMs)"; 60 100 homepage = "https://github.com/BerriAI/litellm"; 61 - license = licenses.mit; 62 101 changelog = "https://github.com/BerriAI/litellm/releases/tag/v${version}"; 102 + license = licenses.mit; 63 103 maintainers = with maintainers; [ happysalada ]; 64 104 }; 65 105 }
+17 -16
pkgs/development/python-modules/llm/default.nix
··· 1 - { 2 - buildPythonApplication, 3 - buildPythonPackage, 4 - fetchFromGitHub, 5 - lib, 6 - makeWrapper, 7 - pytestCheckHook, 8 - python3, 9 - pythonOlder, 10 - ruff, 11 - setuptools, 12 - }: let 1 + { lib 2 + , buildPythonApplication 3 + , buildPythonPackage 4 + , fetchFromGitHub 5 + , makeWrapper 6 + , pytestCheckHook 7 + , python3 8 + , pythonOlder 9 + , ruff 10 + , setuptools 11 + }: 12 + let 13 13 llm = buildPythonPackage rec { 14 14 pname = "llm"; 15 - version = "0.12"; 15 + version = "0.13.1"; 16 16 pyproject = true; 17 17 18 18 disabled = pythonOlder "3.8"; 19 19 20 20 src = fetchFromGitHub { 21 21 owner = "simonw"; 22 - repo = pname; 22 + repo = "llm"; 23 23 rev = "refs/tags/${version}"; 24 - hash = "sha256-aCqdw2co/cXrBwVY/k/aSLl3C22nlH5LvU2yir1/NnQ="; 24 + hash = "sha256-Nq6pduzl8IK+nA3pctst/W4ux7+P6mBFTEHMF+vtBQw="; 25 25 }; 26 26 27 27 patches = [ ··· 36 36 click-default-group 37 37 numpy 38 38 openai 39 + pip 39 40 pluggy 40 41 pydantic 41 42 python-ulid ··· 48 49 nativeCheckInputs = with python3.pkgs; [ 49 50 cogapp 50 51 numpy 52 + pytest-httpx 51 53 pytestCheckHook 52 - requests-mock 53 54 ]; 54 55 55 56 doCheck = true;
+5 -4
pkgs/development/python-modules/openai/default.nix
··· 26 26 27 27 buildPythonPackage rec { 28 28 pname = "openai"; 29 - version = "1.11.1"; 29 + version = "1.12.0"; 30 30 pyproject = true; 31 31 32 32 disabled = pythonOlder "3.7.1"; ··· 35 35 owner = "openai"; 36 36 repo = "openai-python"; 37 37 rev = "refs/tags/v${version}"; 38 - hash = "sha256-PtxKQQfcM4aOlqU0qIJDpB/24Wkt/omx+uDk4mRZU4s="; 38 + hash = "sha256-v623+dxttNDAfVh+2h64SqT4FvaOGRe0zvHCchIy/Wg="; 39 39 }; 40 40 41 41 nativeBuildInputs = [ ··· 75 75 ]; 76 76 77 77 disabledTests = [ 78 - # makes network requests 78 + # Tests make network requests 79 79 "test_streaming_response" 80 + "test_copy_build_request" 80 81 ]; 81 82 82 83 disabledTestPaths = [ 83 - # makes network requests 84 + # Test makes network requests 84 85 "tests/api_resources" 85 86 ]; 86 87
+63
pkgs/development/python-modules/prisma/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , click 4 + , fetchFromGitHub 5 + , httpx 6 + , jinja2 7 + , nodeenv 8 + , pydantic 9 + , pytestCheckHook 10 + , python-dotenv 11 + , pythonOlder 12 + , setuptools 13 + , strenum 14 + , tomlkit 15 + , typing-extensions 16 + }: 17 + 18 + buildPythonPackage rec { 19 + pname = "prisma"; 20 + version = "0.12.0"; 21 + pyproject = true; 22 + 23 + disabled = pythonOlder "3.8"; 24 + 25 + src = fetchFromGitHub { 26 + owner = "RobertCraigie"; 27 + repo = "prisma-client-py"; 28 + rev = "refs/tags/v${version}"; 29 + hash = "sha256-vmcYBUPDhFbxgWyrF+AjoXwAAH2R/tJYttFD+41bPbA="; 30 + }; 31 + 32 + nativeBuildInputs = [ 33 + setuptools 34 + ]; 35 + 36 + propagatedBuildInputs = [ 37 + click 38 + httpx 39 + jinja2 40 + nodeenv 41 + pydantic 42 + python-dotenv 43 + tomlkit 44 + typing-extensions 45 + ] ++ lib.optionals (pythonOlder "3.11") [ 46 + strenum 47 + ]; 48 + 49 + # Building the client requires network access 50 + doCheck = false; 51 + 52 + pythonImportsCheck = [ 53 + "prisma" 54 + ]; 55 + 56 + meta = with lib; { 57 + description = "Auto-generated and fully type-safe database client for prisma"; 58 + homepage = "https://github.com/RobertCraigie/prisma-client-py"; 59 + changelog = "https://github.com/RobertCraigie/prisma-client-py/releases/tag/v${version}"; 60 + license = licenses.asl20; 61 + maintainers = with maintainers; [ fab ]; 62 + }; 63 + }
+47
pkgs/development/python-modules/resend/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , fetchFromGitHub 4 + , setuptools 5 + , pythonOlder 6 + , pytestCheckHook 7 + , requests 8 + }: 9 + 10 + buildPythonPackage rec { 11 + pname = "resend"; 12 + version = "0.7.2"; 13 + pyproject = true; 14 + 15 + disabled = pythonOlder "3.7"; 16 + 17 + src = fetchFromGitHub { 18 + owner = "resend"; 19 + repo = "resend-python"; 20 + rev = "refs/tags/v${version}"; 21 + hash = "sha256-3wX2xNz/6Erv97TlQCuF0Sha0fbJJX1LK9dx8xYG4M0="; 22 + }; 23 + 24 + nativeBuildInputs = [ 25 + setuptools 26 + ]; 27 + 28 + propagatedBuildInputs = [ 29 + requests 30 + ]; 31 + 32 + nativeCheckInputs = [ 33 + pytestCheckHook 34 + ]; 35 + 36 + pythonImportsCheck = [ 37 + "resend" 38 + ]; 39 + 40 + meta = with lib; { 41 + description = "SDK for Resend"; 42 + homepage = "https://github.com/resend/resend-python"; 43 + changelog = "https://github.com/resend/resend-python/releases/tag/v${version}"; 44 + license = licenses.mit; 45 + maintainers = with maintainers; [ fab ]; 46 + }; 47 + }
+6
pkgs/top-level/python-packages.nix
··· 3949 3949 3950 3950 fastapi-mail = callPackage ../development/python-modules/fastapi-mail { }; 3951 3951 3952 + fastapi-sso = callPackage ../development/python-modules/fastapi-sso { }; 3953 + 3952 3954 fast-histogram = callPackage ../development/python-modules/fast-histogram { }; 3953 3955 3954 3956 fastavro = callPackage ../development/python-modules/fastavro { }; ··· 9919 9921 9920 9922 priority = callPackage ../development/python-modules/priority { }; 9921 9923 9924 + prisma = callPackage ../development/python-modules/prisma { }; 9925 + 9922 9926 prison = callPackage ../development/python-modules/prison { }; 9923 9927 9924 9928 proboscis = callPackage ../development/python-modules/proboscis { }; ··· 12693 12697 rerun-sdk = callPackage ../development/python-modules/rerun-sdk { }; 12694 12698 12695 12699 resampy = callPackage ../development/python-modules/resampy { }; 12700 + 12701 + resend = callPackage ../development/python-modules/resend { }; 12696 12702 12697 12703 resize-right = callPackage ../development/python-modules/resize-right { }; 12698 12704