mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-03 12:50:06 +06:00
parent
ab96bf0294
commit
71b19ee251
@ -65,7 +65,17 @@ We provide support for openAI models as well as opensource alternatives from Big
|
||||
models perform better (but require you to have an openAI API key, so cannot be used for free); Hugging Face is
|
||||
providing free access to endpoints for BigCode and OpenAssistant models.
|
||||
|
||||
To use openAI models, you instantiate an [`OpenAiAgent`]:
|
||||
To start with, please install the `agents` extras in order to install all default dependencies.
|
||||
```bash
|
||||
pip install transformers[agents]
|
||||
```
|
||||
|
||||
To use openAI models, you instantiate an [`OpenAiAgent`] after installing the `openai` dependency:
|
||||
|
||||
```bash
|
||||
pip install openai
|
||||
```
|
||||
|
||||
|
||||
```py
|
||||
from transformers import OpenAiAgent
|
||||
|
14
setup.py
14
setup.py
@ -112,6 +112,7 @@ _deps = [
|
||||
"datasets!=2.5.0",
|
||||
"decord==0.6.0",
|
||||
"deepspeed>=0.8.3",
|
||||
"diffusers",
|
||||
"dill<0.3.5",
|
||||
"evaluate>=0.2.0",
|
||||
"fairscale>0.3",
|
||||
@ -123,7 +124,7 @@ _deps = [
|
||||
"fugashi>=1.0",
|
||||
"GitPython<3.1.19",
|
||||
"hf-doc-builder>=0.3.0",
|
||||
"huggingface-hub>=0.11.0,<1.0",
|
||||
"huggingface-hub>=0.14.1,<1.0",
|
||||
"importlib_metadata",
|
||||
"ipadic>=1.0.0,<2.0",
|
||||
"isort>=5.5.4",
|
||||
@ -140,6 +141,7 @@ _deps = [
|
||||
"onnxconverter-common",
|
||||
"onnxruntime-tools>=1.4.2",
|
||||
"onnxruntime>=1.4.0",
|
||||
"opencv-python",
|
||||
"optuna",
|
||||
"optax>=0.0.8,<=0.1.4",
|
||||
"packaging>=20.0",
|
||||
@ -412,6 +414,16 @@ extras["torchhub"] = deps_list(
|
||||
"tqdm",
|
||||
)
|
||||
|
||||
extras["agents"] = deps_list(
|
||||
"diffusers",
|
||||
"accelerate",
|
||||
"datasets",
|
||||
"torch",
|
||||
"sentencepiece",
|
||||
"opencv-python",
|
||||
"Pillow"
|
||||
)
|
||||
|
||||
# when modifying the following list, make sure to update src/transformers/dependency_versions_check.py
|
||||
install_requires = [
|
||||
deps["importlib_metadata"] + ";python_version<'3.8'", # importlib_metadata for Python versions that don't have it
|
||||
|
@ -13,6 +13,7 @@ deps = {
|
||||
"datasets": "datasets!=2.5.0",
|
||||
"decord": "decord==0.6.0",
|
||||
"deepspeed": "deepspeed>=0.8.3",
|
||||
"diffusers": "diffusers",
|
||||
"dill": "dill<0.3.5",
|
||||
"evaluate": "evaluate>=0.2.0",
|
||||
"fairscale": "fairscale>0.3",
|
||||
@ -24,7 +25,7 @@ deps = {
|
||||
"fugashi": "fugashi>=1.0",
|
||||
"GitPython": "GitPython<3.1.19",
|
||||
"hf-doc-builder": "hf-doc-builder>=0.3.0",
|
||||
"huggingface-hub": "huggingface-hub>=0.11.0,<1.0",
|
||||
"huggingface-hub": "huggingface-hub>=0.14.1,<1.0",
|
||||
"importlib_metadata": "importlib_metadata",
|
||||
"ipadic": "ipadic>=1.0.0,<2.0",
|
||||
"isort": "isort>=5.5.4",
|
||||
@ -41,6 +42,7 @@ deps = {
|
||||
"onnxconverter-common": "onnxconverter-common",
|
||||
"onnxruntime-tools": "onnxruntime-tools>=1.4.2",
|
||||
"onnxruntime": "onnxruntime>=1.4.0",
|
||||
"opencv-python": "opencv-python",
|
||||
"optuna": "optuna",
|
||||
"optax": "optax>=0.0.8,<=0.1.4",
|
||||
"packaging": "packaging>=20.0",
|
||||
|
Loading…
Reference in New Issue
Block a user