summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/Phind.py
diff options
context:
space:
mode:
authorrazrab <razrab@PimoLin>2023-10-23 07:25:46 +0200
committerrazrab <razrab@PimoLin>2023-10-23 07:25:46 +0200
commit2b3bc749b39b0c6f3e8921b9e3b2fc52263c568c (patch)
tree7de51129865bd786bdf7b21fa658725a474a8cd8 /g4f/Provider/Phind.py
parentAdded code to ignore certain providers in the API (diff)
parent~ | g4f `v-0.1.7.5` (diff)
downloadgpt4free-2b3bc749b39b0c6f3e8921b9e3b2fc52263c568c.tar
gpt4free-2b3bc749b39b0c6f3e8921b9e3b2fc52263c568c.tar.gz
gpt4free-2b3bc749b39b0c6f3e8921b9e3b2fc52263c568c.tar.bz2
gpt4free-2b3bc749b39b0c6f3e8921b9e3b2fc52263c568c.tar.lz
gpt4free-2b3bc749b39b0c6f3e8921b9e3b2fc52263c568c.tar.xz
gpt4free-2b3bc749b39b0c6f3e8921b9e3b2fc52263c568c.tar.zst
gpt4free-2b3bc749b39b0c6f3e8921b9e3b2fc52263c568c.zip
Diffstat (limited to 'g4f/Provider/Phind.py')
-rw-r--r--g4f/Provider/Phind.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/g4f/Provider/Phind.py b/g4f/Provider/Phind.py
index d7c6f7c7..0e698cba 100644
--- a/g4f/Provider/Phind.py
+++ b/g4f/Provider/Phind.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-import random
+import random, string
from datetime import datetime
from ..typing import AsyncResult, Messages
@@ -22,7 +22,7 @@ class Phind(AsyncGeneratorProvider):
timeout: int = 120,
**kwargs
) -> AsyncResult:
- chars = 'abcdefghijklmnopqrstuvwxyz0123456789'
+ chars = string.ascii_lowercase + string.digits
user_id = ''.join(random.choice(chars) for _ in range(24))
data = {
"question": format_prompt(messages),