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

No output when using forefront. #557

Closed
MandarinAxle opened this issue May 15, 2023 · 6 comments
Closed

No output when using forefront. #557

MandarinAxle opened this issue May 15, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@MandarinAxle
Copy link

I used this code from the example:

from gpt4free import forefront

# create an account
account_data = forefront.Account.create(logging=False)

# get a response
for response in forefront.StreamingCompletion.create(
    account_data=account_data,
    prompt='hello world',
    model='gpt-4'
):
    print(response.choices[0].text, end='')
print("")

After its execution, there is no output in the console.

Screenshots
изображение

Environement

  • python version - 3.10.6
@MandarinAxle MandarinAxle added the bug Something isn't working label May 15, 2023
@lynhsiong
Copy link

I have the same problem:

xxx=forefront.StreamingCompletion.create(account_data=account_data,prompt='who are you',model='gpt-3.5')
yyy=list(xxx)
yyy
[]

here is the "warm" but unhelpful answer by GPT-4 :

I apologize for the confusion earlier. If you're getting an empty list after converting the generator to a list, it's possible that the generator is not producing any output. This could be due to an issue with the library itself or the way it's being used.
To further investigate the issue, I recommend the following steps:
**Check the library's documentation**: Ensure that you're using the gpt4free library and its methods correctly. The documentation should provide examples and explanations on how to use the library effectively.
**Examine the library's source code**: If the documentation doesn't provide enough information, you can try looking at the library's source code to understand how the forefront.StreamingCompletion.create() method works and what might be causing the empty output.
**Debug your code:** Add print statements or use a debugger to step through your code and see where the issue might be occurring. This can help you identify any problems with the input parameters or the way you're using the library.
**Reach out to the library's maintainers or community**: If you're still unable to resolve the issue, consider reaching out to the library's maintainers or community for support. They might have more insights into the specific issue you're facing and can provide guidance on how to resolve it.
Remember that as a software engineer, it's essential to have a problem-solving mindset and be persistent in finding solutions to issues. Debugging and troubleshooting are crucial skills in software development, and working through challenges like this can help you improve your skills and become a better engineer.

@ipdor
Copy link

ipdor commented May 16, 2023

Same as you, when I tried the sample code in gpt4free/gpt4free/forefront/README.md, I encountered the same issue.

And when I tried running this code, I got an error:
` import forefront

account_data = forefront.Account.create(logging=False)
response = forefront.Completion.create(account_data=account_data, prompt='Hello!', model='gpt-4')
print(response) `

Traceback (most recent call last):
File "/home/ubuntu/2-code/gpt4free/gpt4free/test.py", line 5, in
response = forefront.Completion.create(account_data=account_data, prompt='Hello!', model='gpt-4')
File "/home/ubuntu/2-code/gpt4free/gpt4free/forefront/init.py", line 212, in create
raise RuntimeError('Unable to get the response, Please try again')
RuntimeError: Unable to get the response, Please try again

python --version
Python 3.10.6

@uxhao-o
Copy link

uxhao-o commented May 16, 2023

same problem

@kevinDaGeGe
Copy link

20230516114118

@skywalk163
Copy link

same problem +1

@xchwarze
Copy link

forefront change the signature code xiangsx/gpt4free-ts#22

@xtekky xtekky closed this as completed Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants