Skip to content

Commit 194cba3

Browse files
committed
Quitting
1 parent f74fad9 commit 194cba3

File tree

1 file changed

+43
-63
lines changed

1 file changed

+43
-63
lines changed

docs/README.md

Lines changed: 43 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,19 @@ The name *python-tgpt* draws inspiration from its parent project [tgpt](https://
7272

7373
## Providers
7474

75-
These are simply the hosts of the LLMs, which include:
76-
77-
1. [Leo](https://brave.com/leo/) - **Brave**
78-
2. [Koboldai](https://koboldai-koboldcpp-tiefighter.hf.space)
79-
3. [OpenGPTs](https://opengpts-example-vz4y4ooboq-uc.a.run.app/)
80-
4. [OpenAI](https://chat.openai.com) *(API key required)*
81-
5. [WebChatGPT](https://github.com/Simatwa/WebChatGPT) - **OpenAI** *(Session ID required)*
82-
6. [Gemini](https://github.com/Simatwa/bard) - **Google** *(Session ID required)*
83-
9. [Phind](https://www.phind.com)
84-
10. [Llama2](https://www.llama2.ai)
85-
11. [Blackboxai](https://www.blackbox.ai)
86-
12. [gpt4all](https://gpt4all.io) *(Offline)*
87-
13. [Poe](https://poe.com) - Poe|Quora *(Session ID required)*
88-
14. [Groq](https://console.groq.com/playground) *(API Key required)*
89-
15. [Perplexity](https://www.perplexity.ai)
90-
16. [YepChat](https://yep.com)
91-
17. [Novita](https://novita.ai) *(API key required)*
75+
These are simply the hosts of the LLMs, they include:
76+
77+
- [Koboldai](https://koboldai-koboldcpp-tiefighter.hf.space)
78+
- [OpenGPTs](https://opengpts-example-vz4y4ooboq-uc.a.run.app/)
79+
- [OpenAI](https://chat.openai.com) *(API key required)*
80+
- [Phind](https://www.phind.com)
81+
- [Blackboxai](https://www.blackbox.ai)
82+
- [gpt4all](https://gpt4all.io) *(Offline)*
83+
- [Poe](https://poe.com) - Poe|Quora *(Session ID required)*
84+
- [Groq](https://console.groq.com/playground) *(API Key required)*
85+
- [Perplexity](https://www.perplexity.ai)
86+
- [YepChat](https://yep.com)
87+
9288

9389
<details>
9490

@@ -187,32 +183,30 @@ Starting from version 0.2.7, running `$ pytgpt` without any other command or opt
187183

188184
<details>
189185

190-
<summary>
191-
192-
### Developer Docs
193-
186+
<summary>
187+
<h3>Developer Docs</h3>
194188
</summary>
195189

196190
1. Generate a quick response
197191

198192
```python
199-
from pytgpt.leo import LEO
200-
bot = LEO()
193+
from pytgpt.phind import PHIND
194+
bot = PHIND()
201195
resp = bot.chat('<Your prompt>')
202196
print(resp)
203-
# Output : How may I help you.
197+
# Output : How can I assist you today?
204198
```
205199

206200
2. Get back whole response
207201

208202
```python
209-
from pytgpt.leo import LEO
210-
bot = LEO()
211-
resp = bot.ask('<Your Prompt')
203+
from pytgpt.phind import PHIND
204+
bot = PHIND()
205+
resp = bot.chat('<Your prompt>')
212206
print(resp)
213207
# Output
214208
"""
215-
{'completion': "I'm so excited to share with you the incredible experiences...", 'stop_reason': None, 'truncated': False, 'stop': None, 'model': 'llama-2-13b-chat', 'log_id': 'cmpl-3NmRt5A5Djqo2jXtXLBwJ2', 'exception': None}
209+
{'id': 'chatcmpl-gp6cwu2e5ez3ltoyti4z', 'object': 'chat.completion.chunk', 'created': 1731257890, 'model': 'phind-instant-llama-3_1-08-31-2024-checkpoint-1500', 'choices': [{'index': 0, 'delta': {'content': "Hello! I'm an AI assistant created by Phind to help with programming tasks. How can I assist you today?"}, 'finish_reason': None}]}
216210
"""
217211
```
218212

@@ -223,17 +217,22 @@ Just add parameter `stream` with value `true`.
223217
1. Text Generated only
224218

225219
```python
226-
from pytgpt.leo import LEO
227-
bot = LEO()
228-
resp = bot.chat('<Your prompt>', stream=True)
229-
for value in resp:
230-
print(value)
220+
from pytgpt.phind import PHIND
221+
bot = PHIND()
222+
response = bot.chat('hello', stream=True)
223+
for chunk in response:
224+
print(chunk)
231225
# output
232226
"""
233-
How may
234-
How may I help
235-
How may I help you
236-
How may I help you today?
227+
Hello
228+
Hello!
229+
Hello! How
230+
Hello! How can
231+
Hello! How can I
232+
Hello! How can I assist
233+
Hello! How can I assist you
234+
Hello! How can I assist you today
235+
Hello! How can I assist you today?
237236
"""
238237
```
239238

@@ -247,13 +246,10 @@ for value in resp:
247246
print(value)
248247
# Output
249248
"""
250-
{'completion': "I'm so", 'stop_reason': None, 'truncated': False, 'stop': None, 'model': 'llama-2-13b-chat', 'log_id': 'cmpl-3NmRt5A5Djqo2jXtXLBwxx', 'exception': None}
251-
252-
{'completion': "I'm so excited to share with.", 'stop_reason': None, 'truncated': False, 'stop': None, 'model': 'llama-2-13b-chat', 'log_id': 'cmpl-3NmRt5A5Djqo2jXtXLBwxx', 'exception': None}
253-
254-
{'completion': "I'm so excited to share with you the incredible ", 'stop_reason': None, 'truncated': False, 'stop': None, 'model': 'llama-2-13b-chat', 'log_id': 'cmpl-3NmRt5A5Djqo2jXtXLBwxx', 'exception': None}
255-
256-
{'completion': "I'm so excited to share with you the incredible experiences...", 'stop_reason': None, 'truncated': False, 'stop': None, 'model': 'llama-2-13b-chat', 'log_id': 'cmpl-3NmRt5A5Djqo2jXtXLBwxx', 'exception': None}
249+
{'id': 'chatcmpl-icz6a4m1nbbclw9hhgol', 'object': 'chat.completion.chunk', 'created': 1731258032, 'model': 'phind-instant-llama-3_1-08-31-2024-checkpoint-1500', 'choices': [{'index': 0, 'delta': {'content': 'Hello'}, 'finish_reason': None}]}
250+
{'id': 'chatcmpl-icz6a4m1nbbclw9hhgol', 'object': 'chat.completion.chunk', 'created': 1731258032, 'model': 'phind-instant-llama-3_1-08-31-2024-checkpoint-1500', 'choices': [{'index': 0, 'delta': {'content': "Hello! I'm an AI"}, 'finish_reason': None}]}
251+
{'id': 'chatcmpl-icz6a4m1nbbclw9hhgol', 'object': 'chat.completion.chunk', 'created': 1731258032, 'model': 'phind-instant-llama-3_1-08-31-2024-checkpoint-1500', 'choices': [{'index': 0, 'delta': {'content': "Hello! I'm an AI assistant created by Phind to help with coding and technical tasks. How"}, 'finish_reason': None}]}
252+
{'id': 'chatcmpl-icz6a4m1nbbclw9hhgol', 'object': 'chat.completion.chunk', 'created': 1731258032, 'model': 'phind-instant-llama-3_1-08-31-2024-checkpoint-1500', 'choices': [{'index': 0, 'delta': {'content': "Hello! I'm an AI assistant created by Phind to help with coding and technical tasks. How can I assist you today?"}, 'finish_reason': None}]}
257253
"""
258254
```
259255

@@ -349,24 +345,9 @@ print(bot.chat("<Your-prompt>"))
349345

350346
</details>
351347

352-
<details>
353-
354-
<summary>
355-
Novita
356-
357-
</summary>
358-
359-
```python
360-
import pytgpt.novita as novita
361-
bot = novita.NOVITA("<NOVITA-API-KEY>")
362-
print(bot.chat("<Your-prompt>"))
363-
```
364-
365-
</details>
366-
367348
### Asynchronous
368349

369-
**Version 0.7.0** introduces asynchronous implementation to almost all providers except a few such as *perplexity & gemini*, which relies on other libraries which lacks such implementation.
350+
**Version 0.7.0** introduces asynchronous implementation to almost all providers except a few such as *perplexity*, which relies on other libraries which lacks such implementation.
370351

371352
To make it easier, you just have to prefix `Async` to the common synchronous class name. For instance `OPENGPT` will be accessed as `AsyncOPENGPT`:
372353

@@ -423,8 +404,8 @@ To obtain more tailored responses, consider utilizing [optimizers](pytgpt/utils.
423404
</summary>
424405

425406
```python
426-
from pytgpt.leo import LEO
427-
bot = LEO()
407+
from pytgpt.phind import PHIND
408+
bot = PHIND()
428409
resp = bot.ask('<Your Prompt>', optimizer='code')
429410
print(resp)
430411
```
@@ -654,7 +635,6 @@ Commands:
654635
imager Generate images with pollinations.ai
655636
interactive Chat with AI interactively (Default)
656637
utils Utility endpoint for pytgpt
657-
webchatgpt Reverse Engineered ChatGPT Web-Version
658638
```
659639

660640
</details>

0 commit comments

Comments
 (0)