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

It is wrong with gpt4 api? #37

Open
Seyanliu opened this issue Feb 28, 2024 · 1 comment
Open

It is wrong with gpt4 api? #37

Seyanliu opened this issue Feb 28, 2024 · 1 comment

Comments

@Seyanliu
Copy link

Traceback (most recent call last):
  File "/data/liusy/RPG-DiffusionMaster/RPG.py", line 235, in <module>
    image=RPG(user_prompt=user_prompt,
  File "/data/liusy/RPG-DiffusionMaster/RPG.py", line 90, in RPG
    params=GPT4(input_prompt,version,key)
  File "/data/liusy/RPG-DiffusionMaster/mllm.py", line 50, in GPT4
    text=obj['choices'][0]['message']['content']
KeyError: 'choices'
@ZhaochenYu0201
Copy link
Collaborator

Thank you for your attention for our project, I have just tested our code, and it seems works well without the problem you mentioned. For this issue, the potential causes could stem from an expired API key leading to response errors, a lack of GPT-4 authorization, or perhaps due to network issues. In any case, the most direct approach would be to print the response's returned object. In this way, you can probably find out the specific underlying reasons for the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants