diff options
author | H Lohaus <hlohaus@users.noreply.github.com> | 2023-12-27 04:39:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-27 04:39:18 +0100 |
commit | 1ddd01f1ad0f2d3ad84404bffe4262b6a43ac3ee (patch) | |
tree | e9a2a3990a4c03bdb0b9e48a98e7b441f6d7f707 /g4f/Provider | |
parent | Update get_latest_version for docker (diff) | |
parent | Fix Phind provider (diff) | |
download | gpt4free-1ddd01f1ad0f2d3ad84404bffe4262b6a43ac3ee.tar gpt4free-1ddd01f1ad0f2d3ad84404bffe4262b6a43ac3ee.tar.gz gpt4free-1ddd01f1ad0f2d3ad84404bffe4262b6a43ac3ee.tar.bz2 gpt4free-1ddd01f1ad0f2d3ad84404bffe4262b6a43ac3ee.tar.lz gpt4free-1ddd01f1ad0f2d3ad84404bffe4262b6a43ac3ee.tar.xz gpt4free-1ddd01f1ad0f2d3ad84404bffe4262b6a43ac3ee.tar.zst gpt4free-1ddd01f1ad0f2d3ad84404bffe4262b6a43ac3ee.zip |
Diffstat (limited to 'g4f/Provider')
-rw-r--r-- | g4f/Provider/Phind.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/g4f/Provider/Phind.py b/g4f/Provider/Phind.py index 9d2acc75..bb216989 100644 --- a/g4f/Provider/Phind.py +++ b/g4f/Provider/Phind.py @@ -56,14 +56,15 @@ class Phind(AsyncGeneratorProvider): "customLinks": [] }, "context": "", - "rewrittenQuestion": prompt + "rewrittenQuestion": prompt, + "challenge": 0.21132115912208504 } async with session.post(f"{cls.url}/api/infer/followup/answer", headers=headers, json=data) as response: new_line = False async for line in response.iter_lines(): if line.startswith(b"data: "): chunk = line[6:] - if chunk.startswith(b"<PHIND_METADATA>"): + if chunk.startswith(b"<PHIND_METADATA>") or chunk.startswith(b"<PHIND_INDICATOR>"): pass elif chunk: yield chunk.decode() @@ -71,4 +72,4 @@ class Phind(AsyncGeneratorProvider): yield "\n" new_line = False else: - new_line = True
\ No newline at end of file + new_line = True |