aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2023-07-19 21:46:36 +0200
committerRicardo Wurmus <rekado@elephly.net>2023-07-23 23:08:47 +0200
commitb5af0b9c016a65bf32b06a4f118c2ed48f3a80b3 (patch)
tree73290103b49030c382a9d92412a5bdd4d20dc19b
parentb95b34d6a34e14ad42e47794a60e7e0f70eb0cdb (diff)
downloadguix-b5af0b9c016a65bf32b06a4f118c2ed48f3a80b3.tar.gz
guix-b5af0b9c016a65bf32b06a4f118c2ed48f3a80b3.zip
gnu: Add python-openai.
* gnu/packages/python-web.scm (python-openai): New variable.
-rw-r--r--gnu/packages/python-web.scm30
1 files changed, 30 insertions, 0 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 339ac00a23..529b39fa9d 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -1832,6 +1832,36 @@ is Python’s.")
service.")
(license license:expat)))
+(define-public python-openai
+ (package
+ (name "python-openai")
+ (version "0.27.8")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "openai" version))
+ (sha256
+ (base32
+ "0dlmxnib71fih9xzmd3v41alwv4qb8qrxixsrrsf5vmigmf0k0r4"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:test-flags
+ ;; These require internet access and an openai API key.
+ '(list "--ignore=openai/tests/asyncio/test_endpoints.py"
+ "--ignore=openai/tests/test_endpoints.py"
+ "-k" "not test_requestor_cycle_sessions\
+ and not test_requestor_sets_request_id\
+ and not test_file_cli")))
+ (propagated-inputs (list python-aiohttp python-requests python-tqdm
+ python-typing-extensions))
+ (native-inputs (list python-black python-pytest python-pytest-asyncio
+ python-pytest-mock))
+ (home-page "https://github.com/openai/openai-python")
+ (synopsis "Python client library for the OpenAI API")
+ (description "This package provides a Python client library for the
+OpenAI API.")
+ (license license:expat)))
+
(define-public python-openapi-schema-validator
(package
(name "python-openapi-schema-validator")