Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting System Announcement in Every response and Other Models not Working #1964

Open
kkhatke opened this issue May 17, 2024 · 2 comments
Open
Assignees
Labels
bug Something isn't working stale

Comments

@kkhatke
Copy link

kkhatke commented May 17, 2024

Bug description

After Installing the g4f
pip install -U g4f

Define a Function

def get_updates(prompt):
    """
    Function to get updates based on a prompt using the GPT-3.5-turbo model.
    Parameters: prompt (str): The prompt for generating updates.
    Returns: str: The content of the response message.
    """
    response = client.chat.completions.create(
        model="gpt-3.5-turbo",
        messages=[{
            "role": "user", 
            "content": f"{prompt}"
        }]
    )
    return response.choices[0].message.content
about_prompt = f"Update the {about} for {state} with the following information: {resource_name}, and keep it in 2-3 lines in English"
about_update = get_updates(about_prompt)

it will give me a response everytime

[System Announcement] 2024/05/17 17:12 The website interface is faulty, and the webmaster is expediting it.
It will be fixed before the weekend. Please be patient and get off work on Friday and have a good weekend. The latest address of this website is https://chat18.aichatos.xyz. Please bookmark it in your browser to open it permanently. Open a new session to view the latest address.

Screenshots
image

Environment

  • python version - 3.11.0

Additional context
and if I change the model
In model = gpt-4

g4f.errors.RetryProviderError: RetryProvider failed:
Liaobots: ResponseStatusError: Response 500: Error
Bing: RateLimitError: CaptchaChallenge: Use other cookies or/and ip address

and in all other models

g4f.errors.RetryProviderError: RetryProvider failed:
You: Exception:
---------------------
Failed to connect to browser
---------------------
One of the causes could be when you are running as root.
In that case you need to pass no_sandbox=True

@kkhatke kkhatke added the bug Something isn't working label May 17, 2024
@kkhatke kkhatke changed the title Getting System Announcement in Every response Getting System Announcement in Every response and Other Models not Working May 17, 2024
@pythonmanGo
Copy link

the same problem ,wethear set cookie jason or har or login in in VM chorme or pip install nodriver,that's no work for me to use gpt4o

Copy link

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 github-actions bot added the stale label May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

3 participants