Skip to content

Commit 11fc9c4

Browse files
authored
Update README.md
1 parent d487295 commit 11fc9c4

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

docs/README.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@ python-tgpt
4141
```
4242

4343
```python
44-
# CLI
45-
from pytgpt.console import main
46-
main()
47-
"""
44+
>>> from pytgpt.console import main
45+
>>> main()
4846
Welcome to AI Chat in terminal. Type 'help' or 'h' for usage info.
4947
Submit any bug at https://github.com/Simatwa/python-tgpt/issues/new
5048
╭─[Smartwa@pyTGPT](phind)~[🕒04:05:55-💻00:00:00-0.0s]
@@ -499,7 +497,8 @@ print(resp)
499497
500498
</details>
501499
502-
**Note**: Commencing from [v0.1.0](https://github.com/Simatwa/python-tgpt/releases/), the default mode of interaction is conversational. This mode enhances the interactive experience, offering better control over the chat history. By associating previous prompts and responses, it tailors conversations for a more engaging experience.
500+
> [!IMPORTANT]
501+
> Commencing from [v0.1.0](https://github.com/Simatwa/python-tgpt/releases/), the default mode of interaction is conversational. This mode enhances the interactive experience, offering better control over the chat history. By associating previous prompts and responses, it tailors conversations for a more engaging experience.
503502
504503
You can still disable the mode:
505504
@@ -509,7 +508,7 @@ bot = koboldai.KOBOLDAI(is_conversation=False)
509508
510509
Utilize the `--disable-conversation` flag in the console to achieve the same functionality.
511510
512-
> [!WARNING]
511+
> [!CAUTION]
513512
> **Bard** autohandles context due to the obvious reason; the `is_conversation` parameter is not necessary at all hence not required when initializing the class. Also be informed that majority of providers offered by *gpt4free* requires *Google Chrome* inorder to function.
514513
515514
### Advanced Usage of Placeholders
@@ -524,13 +523,13 @@ The `generate` functionality has been enhanced starting from *v0.3.0* to enable
524523
This feature is particularly beneficial for intricate operations. For example:
525524
526525
```bash
527-
$ 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
526+
$ git diff | pytgpt generate "Here is a diff file: {{stream}} Make a concise commit message from it, aligning with my commit message history: {{copied}}" --shell --new
528527
```
529528
> 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.
530529
531530
### Introducing RawDog
532531
533-
RawDog is a masterpiece feature that exploits the versatile capabilities of Python to command and control your system as per your needs. You can literally do anything with it, since it generates and executes python codes, driven by **your prompts**! To have a bite of *rawdog* simply append the flag `--rawdog` *shortcut* `-rd` in *generate/interactive* mode. This introduces a never seen-before feature in the *tgpt ecosystem*. Thanks to [AbanteAI/rawdog](https://github.com/AbanteAI/rawdog) for the idea.
532+
RawDog is a masterpiece feature that exploits the versatile capabilities of Python to command and control your system as per your needs. You can literally do anything with it, since it generates and executes python codes, driven by **your prompts**! To have a bite of *rawdog* simply append the flag `--rawdog` *shortform* `-rd` in *generate/interactive* mode. This introduces a never seen-before feature in the *tgpt ecosystem*. Thanks to [AbanteAI/rawdog](https://github.com/AbanteAI/rawdog) for the idea.
534533
535534
This can be useful in some ways. For instance :
536535
@@ -544,29 +543,29 @@ This can be useful in some ways. For instance :
544543
<img src="https://github.com/Simatwa/python-tgpt/blob/main/assets/Figure_1.png?raw=true" width='60%'>
545544
</p>
546545
547-
<details>
548-
549-
<summary>
550-
551546
## Passing Environment Variables
552547
553548
Pytgpt **v0.4.6** introduces a convention way of taking variables from the environment.
554549
To achieve that, set the environment variables in your operating system or script with prefix `PYTGPT_` followed by the option name in uppercase, replacing dashes with underscores.
555550
556551
For example, for the option `--provider`, you would set an environment variable `PYTGPT_PROVIDER` to provide a default value for that option. Same case applies to boolean flags such as `--rawdog` whose environment variable will be `PYTGPT_RAWDOG` with value being either `true/false`. Finally, `--awesome-prompt` will take the environment variable `PYTGPT_AWESOME_PROMPT`.
557552
553+
> [!NOTE]
554+
> This is **NOT** limited to any command
555+
558556
The environment variables can be overridden by explicitly declaring new value.
559557
560558
> [!TIP]
561559
> Save the variables in a `.env` file in your current directory or export the them in your `.zshrc` file.
562560
563-
> [!NOTE]
564-
> This is not limited to any command.
565-
566561
## Dynamic Provider
567562
568563
Version **0.4.6** also introduces dynamic provider called `g4fauto`, which represents the fastest working g4f-based provider.
569564
565+
<details>
566+
567+
<summary>
568+
570569
For more usage info run `$ pytgpt --help`
571570
572571
</summary>
@@ -595,4 +594,3 @@ Commands:
595594
596595
1. [x] [tgpt](https://github.com/aandrew-me/tgpt)
597596
2. [x] [gpt4free](https://github.com/xtekky/gpt4free)
598-
3. [x] You

0 commit comments

Comments
 (0)