summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md13
-rw-r--r--g4f/Provider/GptGo.py2
2 files changed, 15 insertions, 0 deletions
diff --git a/README.md b/README.md
index 2f7e6532..59c743b5 100644
--- a/README.md
+++ b/README.md
@@ -62,6 +62,7 @@ python -m g4f.interference.run
- [Contributors](#contributors)
- [Copyright](#copyright)
- [Star History](#star-history)
+- [License](#license)
## Getting Started
@@ -643,4 +644,16 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
<img width="500" alt="Star History Chart" src="https://api.star-history.com/svg?repos=xtekky/gpt4free&type=Date">
</a>
+## License
+<table>
+ <tr>
+ <td>
+ <p align="center"> <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/93/GPLv3_Logo.svg/1200px-GPLv3_Logo.svg.png" width="80%"></img>
+ </td>
+ <td>
+ <img src="https://img.shields.io/badge/License-GNU_GPL_v3.0-red.svg"/> <br>
+This project is licensed under <a href="./LICENSE">GNU_GPL_v3.0</a>. <img width=2300/>
+ </td>
+ </tr>
+</table>
diff --git a/g4f/Provider/GptGo.py b/g4f/Provider/GptGo.py
index f9b94a5c..255c0ca9 100644
--- a/g4f/Provider/GptGo.py
+++ b/g4f/Provider/GptGo.py
@@ -60,6 +60,8 @@ class GptGo(AsyncGeneratorProvider):
if line.startswith("data: [DONE]"):
break
line = json.loads(line[len(start):-1])
+ if line["choices"][0]["finish_reason"] == "stop":
+ break
content = line["choices"][0]["delta"].get("content")
if content:
yield content