File tree 5 files changed +18
-5
lines changed
5 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -228,13 +228,20 @@ https://github.com/OpenBMB/AgentVerse/assets/11704492/4d07da68-f942-4205-b558-f1
228
228
229
229
## Installation
230
230
231
+
231
232
** Manually Install (Recommended!)**
233
+
234
+ ** Make sure you have Python >= 3.9**
232
235
``` bash
233
236
git clone https://github.com/OpenBMB/AgentVerse.git --depth 1
234
237
cd AgentVerse
235
- python setup.py develop
238
+ pip install -e .
239
+ ```
240
+
241
+ If you want to use AgentVerse with local models such as LLaMA, you need to additionally install some other dependencies:
242
+ ``` bash
243
+ pip install -r requirements_local.txt
236
244
```
237
- Some users have reported problems installing the ` orjson ` required by ` gradio ` . One simple workaround is to install it with Anaconda ` conda install -c conda-forge orjson ` .
238
245
239
246
** Install with pip**
240
247
Original file line number Diff line number Diff line change 5
5
from agentverse .logging import logger
6
6
from agentverse .message import Message
7
7
from agentverse .llms import LOCAL_LLMS
8
- from transformers import AutoTokenizer
9
8
10
9
11
10
def count_string_tokens (prompt : str = "" , model : str = "gpt-3.5-turbo" ) -> int :
@@ -29,6 +28,7 @@ def count_message_tokens(
29
28
tokens_per_name = 1
30
29
encoding_model = "gpt-4"
31
30
elif model in LOCAL_LLMS :
31
+ from transformers import AutoTokenizer
32
32
encoding = AutoTokenizer .from_pretrained (model )
33
33
else :
34
34
raise NotImplementedError (
Original file line number Diff line number Diff line change 2
2
fastapi == 0.95.1
3
3
uvicorn
4
4
py3langid
5
- iso-639
5
+ setuptools-scm
6
6
openai == 0.27.8
7
7
opencv-python == 4.8.0.76
8
8
gradio
@@ -17,5 +17,4 @@ colorlog
17
17
rapidfuzz
18
18
spacy
19
19
colorama == 0.4.6
20
- fschat [model_worker,webui ]
21
20
tiktoken == 0.5.1
Original file line number Diff line number Diff line change
1
+ fschat[model_worker,webui]
Original file line number Diff line number Diff line change 5
5
with open ("requirements.txt" , "r" ) as f :
6
6
requirements = f .read ().splitlines ()
7
7
8
+ with open ("requirements_local.txt" , "r" ) as f :
9
+ requirements_local = f .read ().splitlines ()
10
+
8
11
with open ("README.md" , "r" , encoding = 'utf8' ) as fh :
9
12
long_description = fh .read ()
10
13
38
41
# "langchain",
39
42
# ],
40
43
install_requires = requirements ,
44
+ extras_require = {
45
+ 'local' : requirements_local
46
+ },
41
47
include_package_data = True ,
42
48
entry_points = {
43
49
"console_scripts" : [
You can’t perform that action at this time.
0 commit comments