|
8 | 8 | <a href="https://github.com/Simatwa/python-tgpt/actions/workflows/python-test.yml"><img src="https://github.com/Simatwa/python-tgpt/actions/workflows/python-test.yml/badge.svg" alt="Python Test"/></a> |
9 | 9 | --> |
10 | 10 | <a href="https://github.com/Simatwa/python-tgpt/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/static/v1?logo=GPL&color=Blue&message=MIT&label=License"/></a> |
11 | | -<a href="https://pypi.org/project/python-tgpt"><img alt="PyPi" src="https://img.shields.io/static/v1?logo=pypi&label=Pypi&message=0.2.9&color=green"/></a> |
| 11 | +<a href="https://pypi.org/project/python-tgpt"><img alt="PyPi" src="https://img.shields.io/static/v1?logo=pypi&label=Pypi&message=0.3.0&color=green"/></a> |
12 | 12 | <a href="https://github.com/psf/black"><img alt="Black" src="https://img.shields.io/static/v1?logo=Black&label=Code-style&message=Black"/></a> |
13 | 13 | <a href="#"><img alt="Passing" src="https://img.shields.io/static/v1?logo=Docs&label=Docs&message=Passing&color=green"/></a> |
14 | 14 | <a href="https://github.com/Simatwa/python-tgpt/actions/workflows/python-package.yml"><img src="https://github.com/Simatwa/python-tgpt/actions/workflows/python-package.yml/badge.svg"/></a> |
@@ -314,11 +314,27 @@ Utilize the `--disable-conversation` flag in the console to achieve the same fun |
314 | 314 |
|
315 | 315 | > **Warning** : **Bard** and **WebChatGPT** autohandles context due to the obvious reason; the `is_conversation` parameter is not necessary at all hence not required when initializing the respective classes. |
316 | 316 |
|
| 317 | +### Advanced Usage of Placeholders |
| 318 | + |
| 319 | +The `generate` functionality has been enhanced starting from *v0.3.0* to enable comprehensive utilization of the `--with-copied` option and support for accepting piped inputs. This improvement introduces placeholders, offering dynamic values for more versatile interactions. |
| 320 | + |
| 321 | +| Placeholder | Represents | |
| 322 | +| ------------ | ----------- | |
| 323 | +| `{{stream}}` | The piped input | |
| 324 | +| `{{copied}}` | The last copied text | |
| 325 | + |
| 326 | +This feature is particularly beneficial for intricate operations. For example: |
| 327 | + |
| 328 | +```bash |
| 329 | +$ 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 |
| 330 | +``` |
| 331 | +> 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. |
| 332 | +
|
317 | 333 | For more usage info run `$ pytgpt --help` |
318 | 334 |
|
| 335 | +## [CHANGELOG](https://github.com/Simatwa/python-tgpt/blob/main/docs/CHANGELOG.md) |
319 | 336 |
|
320 | 337 | ## Acknowledgements |
321 | 338 |
|
322 | 339 | 1. [x] [tgpt](https://github.com/aandrew-me/tgpt) |
323 | | -2. [x] You |
324 | | - |
| 340 | +2. [x] You |
0 commit comments