gpt4free icon indicating copy to clipboard operation
gpt4free copied to clipboard

Getting PHIND_BACKEND_ERROR>Invalid request body</PHIND_BACKEND_ERROR> when using Bing

Open John4650-hub opened this issue 5 months ago • 3 comments

Known Issues // delete this

  • you.com issue / fix: use proxy, or vpn, your country is probably flagged
  • forefront account creation error / use your own session or wait for fix

Bug description What did you do, what happened, which file did you try to run, in which directory Describe what you did after downloading repo, such as moving to this repo, running this file. This is the code i use.

import g4f

txt=""
with open('../msg.txt','r') as fhand:
    txt=fhand.read()
    fhand.close()

MSG=txt
g4f.debug.logging = False  # Enable logging
g4f.check_version = False  # Disable automatic version checking
response = g4f.ChatCompletion.create(
    model=g4f.models.gpt_4,
    messages=[{"role": "user", "content": MSG}]
    )

for message in response:
    print(message,end="")

Here is my workflow

name: g4f application

on:
  push:
    branches: [ "main" ]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
    - name: get-xtekky-gpt4free-repo
      run: |
       (sh g4f_lts.sh) > lg # fethes latest release
       unzip g4f.zip # unzip archive containing latest release
    - name: Set up Python 3.10
      uses: actions/setup-python@v4
      with:
        python-version: "3.10"
        cache: 'pip'
    - run: | # install the lastest requirements
       cd xtekky-gpt4free-* 
       pip install -r requirements.txt
    - name: Run-gpt4free
      run: |
       (mv main.py xtekky-gpt4free-*) > lg
       cd xtekky-gpt4free-*
       echo "msg here" #marks where message starts from
       python main.py

I have a created a github repository and i use github actions to fetch the latest release so everything work from the repository. I have been using this workflow for quite sometime and sometimes could get the message saying PHIND_BACKEND_ERROR>Invalid request body</PHIND_BACKEND_ERROR> but could be resolved when i send another request but today it has failed to work.

John4650-hub avatar Feb 03 '24 12:02 John4650-hub

Phind.com has removed the free gpt4 services . Now free version only support Phind v10

haseebahmed295 avatar Feb 06 '24 04:02 haseebahmed295

I think the issue will be there even if you hardcode it to always use Phind model. They added a new backend_token thing that get sent forr each request. I'm guessing this token is generated from the phind frontend

SilverMarcs avatar Feb 06 '24 12:02 SilverMarcs

Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.

github-actions[bot] avatar Feb 14 '24 00:02 github-actions[bot]

Closing due to inactivity.

github-actions[bot] avatar Feb 21 '24 00:02 github-actions[bot]