This repository was archived by the owner on Jul 14, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +13
-32
lines changed Expand file tree Collapse file tree 3 files changed +13
-32
lines changed Original file line number Diff line number Diff line change 33import json
44import random
55import string
6+ from uuid import uuid4
67
78
89class Conversation :
@@ -85,7 +86,7 @@ def send(self, text: str) -> str:
8586 }
8687 }],
8788 "model" : "text-davinci-002-render-sha" ,
88- "parent_message_id" : self . new_message_id ( ),
89+ "parent_message_id" : str ( uuid4 () ),
8990 "timezone_offset_min" : - 330
9091 }
9192
@@ -139,18 +140,3 @@ def send(self, text: str) -> str:
139140 message_parts : list = data ["message" ]["content" ]["parts" ]
140141
141142 return "" .join (message_parts )
142-
143- @staticmethod
144- def new_message_id () -> str :
145-
146- return str (
147- "" .join (random .choices (string .ascii_lowercase + string .digits , k = 8 )) +
148- "-" +
149- "" .join (random .choices (string .ascii_lowercase + string .digits , k = 4 )) +
150- "-" +
151- "" .join (random .choices (string .ascii_lowercase + string .digits , k = 4 )) +
152- "-" +
153- "" .join (random .choices (string .ascii_lowercase + string .digits , k = 4 )) +
154- "-" +
155- "" .join (random .choices (string .ascii_lowercase + string .digits , k = 12 ))
156- )
Original file line number Diff line number Diff line change 55import string
66import os
77from .Authentication import Authentication
8+ from uuid import uuid4
89
910
1011class Generative :
@@ -86,7 +87,7 @@ def prompt(self, text: str) -> str:
8687 }
8788 }],
8889 "model" : "text-davinci-002-render-sha" ,
89- "parent_message_id" : self . new_message_id ( ),
90+ "parent_message_id" : str ( uuid4 () ),
9091 "timezone_offset_min" : - 330
9192 }
9293
@@ -134,18 +135,3 @@ def prompt(self, text: str) -> str:
134135 message_parts : list = data ["message" ]["content" ]["parts" ]
135136
136137 return "" .join (message_parts )
137-
138- @staticmethod
139- def new_message_id () -> str :
140-
141- return str (
142- "" .join (random .choices (string .ascii_lowercase + string .digits , k = 8 )) +
143- "-" +
144- "" .join (random .choices (string .ascii_lowercase + string .digits , k = 4 )) +
145- "-" +
146- "" .join (random .choices (string .ascii_lowercase + string .digits , k = 4 )) +
147- "-" +
148- "" .join (random .choices (string .ascii_lowercase + string .digits , k = 4 )) +
149- "-" +
150- "" .join (random .choices (string .ascii_lowercase + string .digits , k = 12 ))
151- )
Original file line number Diff line number Diff line change 11# ProGPT - Free GPT-3.5 API
2+
3+ [ ![ PyPI] ( https://img.shields.io/pypi/v/progpt )] ( https://pypi.org/project/progpt )
4+ [ ![ PyPI - Python Version] ( https://img.shields.io/pypi/pyversions/progpt )] ( )
5+ [ ![ Downloads] ( https://static.pepy.tech/badge/progpt )] ( https://pepy.tech/project/progpt )
6+ [ ![ Twitter Share] ( https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Fdiezo%2Fprogpt )] ( https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2Fdiezo%2Fprogpt )
7+
28I reverse engineered [ ChatGPT 3.5] ( https://chat.openai.com ) 's Free Web API and put it all together into this simple python package.
39
410It supports both ** Generative** & ** Conversation** mode.
511
612[ <img style =" margin-top : 10px " src =" https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-1.svg " width =" 160 " />] ( https://buymeacoffee.com/diezo )
713
14+ ## 🌟 Just a minute!
15+ ProGPT is still in it's early stages and requires your support. Don't forget to give a star. Thank you!
16+
817## Installation
918``` python
1019$ pip install progpt
You can’t perform that action at this time.
0 commit comments