Skip to content

Commit e127674

Browse files
committed
Add partial installation option
1 parent 95b7477 commit e127674

File tree

8 files changed

+54
-33
lines changed

8 files changed

+54
-33
lines changed

.github/workflows/binaries-minimal-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
- name: Install dependencies and python-tgpt
3636
run: |
3737
python -m pip install --upgrade pip pyinstaller pillow
38+
python -m pip install -r requirements.txt
3839
python -m pip install .
3940
- name: Build executable
4041
run: |

.github/workflows/binaries-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
- name: Install dependencies and python-tgpt
3636
run: |
3737
python -m pip install --upgrade pip pyinstaller pillow g4f[all]
38+
python -m pip install -r requirements.txt
3839
python -m pip install .
3940
- name: Build executable
4041
run: |

.github/workflows/python-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
- name: Install dependencies
3030
run: |
3131
python -m pip install --upgrade pip
32+
python -m pip install -r requirements.txt
3233
pip install build
3334
- name: Build package
3435
run: python -m build

docs/CHANGELOG.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,17 @@ Assume role of the LLM and give your response.*
300300
- Bard fixed. #23 #15
301301
- Full and minimal executables.
302302

303-
## v0.3.8
303+
## v0.3.9
304+
305+
**What's new?**
306+
307+
- Phind fixed. #https://github.com/Simatwa/python-tgpt/issues/21#issuecomment-1925326331
308+
309+
## v0.4.0
304310

305311
**What's new?**
306312

307-
- Phind fixed. #https://github.com/Simatwa/python-tgpt/issues/21#issuecomment-1925326331
313+
- New provider - [Llama2](https://www.llama2.ai)
314+
- New provider - [Blackboxai](https://www.blackbox.ai)
315+
- Disable g4f version check.
316+
- Partial or full installation options.

docs/README.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -233,30 +233,24 @@ Download binaries for your system from [here.](https://github.com/Simatwa/python
233233

234234
Alternatively, you can install non-binaries. *(Recommended)*
235235

236-
Choose one of the following methods to get started.
236+
1. Developers:
237237

238-
1. From PyPI:
239-
240-
```bash
241-
pip install --upgrade python-tgpt
238+
```sh
239+
pip install python-tgpt
242240
```
243241

244-
2. Directly from the source:
242+
2. Commandline:
245243

246-
```bash
247-
pip install git+https://github.com/Simatwa/python-tgpt.git
244+
```sh
245+
pip install python-tgpt[cli]
248246
```
249247

250-
3. Clone and Install:
248+
3. Full installation:
251249

252-
```bash
253-
git clone https://github.com/Simatwa/python-tgpt.git
254-
cd python-tgpt
255-
pip install .
250+
```sh
251+
pip install python-tgpt[all]
256252
```
257253

258-
> **Note** : Run `$ pytgpt gpt4free update` to install extra dependencies of **gpt4free**.
259-
260254
## Usage
261255

262256
This package offers a convenient command-line interface.
@@ -504,7 +498,7 @@ The `generate` functionality has been enhanced starting from *v0.3.0* to enable
504498
This feature is particularly beneficial for intricate operations. For example:
505499

506500
```bash
507-
$ git diff | pytgpt generate "Here is a diff file: {{stream}} Make a concise commit message from it, aligning with my commit message history: {{copied}}" -p fakeopen --with-copied --shell --new
501+
$ git diff | pytgpt generate "Here is a diff file: {{stream}} Make a concise commit message from it, aligning with my commit message history: {{copied}}" -p fakeopen --shell --new
508502
```
509503
> In this illustration, `{{stream}}` denotes the result of the `$ git diff` operation, while `{{copied}}` signifies the content copied from the output of the `$ git log` command.
510504

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ appdirs==1.4.4
77
webchatgpt==0.2.7
88
GoogleBard1==2.1.1
99
colorama==0.4.6
10-
g4f>=0.2.0.6
10+
g4f>=0.2.1.0
1111
pyyaml==6.0.1

setup.py

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,31 @@
55
from setuptools import find_packages
66

77

8+
INSTALL_REQUIRE = [
9+
"requests==2.28.2",
10+
"appdirs==1.4.4",
11+
"pyyaml==6.0.1",
12+
]
13+
14+
cli_reqs = [
15+
"click==8.1.3",
16+
"rich==13.3.4",
17+
"clipman==3.1.0",
18+
"pyperclip==1.8.2",
19+
"colorama==0.4.6",
20+
"webchatgpt==0.2.7",
21+
"GoogleBard1==2.1.1",
22+
"g4f>=0.2.1.0",
23+
]
24+
25+
EXTRA_REQUIRE = {
26+
"cli": cli_reqs,
27+
"all": [
28+
"g4f[all]>=0.2.1.0",
29+
]
30+
+ cli_reqs,
31+
}
32+
833
DOCS_PATH = Path(__file__).parents[0] / "docs/README.md"
934
PATH = Path("README.md")
1035
if not PATH.exists():
@@ -14,7 +39,7 @@
1439

1540
setup(
1641
name="python-tgpt",
17-
version="0.3.9",
42+
version="0.4.0",
1843
license="MIT",
1944
author="Smartwa",
2045
maintainer="Smartwa",
@@ -36,18 +61,8 @@
3661
"pytgpt = pytgpt.console:main",
3762
],
3863
},
39-
install_requires=[
40-
"requests==2.28.2",
41-
"click==8.1.3",
42-
"rich==13.3.4",
43-
"clipman==3.1.0",
44-
"pyperclip==1.8.2",
45-
"appdirs==1.4.4",
46-
"webchatgpt==0.2.7",
47-
"GoogleBard1==2.1.1",
48-
"colorama==0.4.6",
49-
"g4f>=0.2.0.6",
50-
],
64+
install_requires=INSTALL_REQUIRE,
65+
extras_require=EXTRA_REQUIRE,
5166
python_requires=">=3.9",
5267
keywords=[
5368
"chatgpt",

src/pytgpt/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from .utils import appdir
22
import g4f
33

4-
__version__ = "0.3.9"
4+
__version__ = "0.4.0"
55
__author__ = "Smartwa"
66
__repo__ = "https://github.com/Simatwa/python-tgpt"
77

0 commit comments

Comments
 (0)