gpt4free icon indicating copy to clipboard operation
gpt4free copied to clipboard

can't work in colab, says my key is wrong

Open YeoZIllnard-Unique opened this issue 1 year ago • 1 comments

KeyError Traceback (most recent call last) in <cell line: 24>() 35 print(text) 36 elif streaming_response and not chat_mode: ---> 37 for response in quora.StreamingCompletion.create(custom_model=model, prompt=prompt, token=token): 38 text = response.completion.choices[0].text 39 print(text)

1 frames /content/gpt4free/quora/api.py in send_message(self, chatbot, message, with_chat_break, timeout) 369 "bot": chatbot, 370 "query": message, --> 371 "chatId": self.bots[chatbot]["chatId"], 372 "source": None, 373 "withChatBreak": with_chat_break,

KeyError: 'gpt-4'

YeoZIllnard-Unique avatar Apr 26 '23 11:04 YeoZIllnard-Unique

I made the Colab. Did you try using other models (other than GPT-4 which you can get one message per 10 hours I think anyways) Update: you may want to try upper case for the model name "GPT-4" instead of "gpt-4"

DanielShemesh avatar Apr 26 '23 12:04 DanielShemesh