Open zimba7768 opened 10 months ago
I get the same error: InvalidRequestError: The model gpt-4
does not exist or you do not have access to it.
I have a paid openai subscription with an newly generated API key. Didn't work. Tried it with again a new api key but still get this error.
I have other applications that succesfully use my openai key so that can hardly be the problem.
Anyone?
Replace all 'gpt-4-32k' with 'gpt-4' . The 32k is only available to a very small trial group and currently only being given out to the azure clients.
Did just that; replaced every instance but I get the same error... Any other suggestion?
Thank you for replying back to this post. I also did the same suggestion with replacing all the "gpt-4-32K" with "gpt-4". I now got a different error.
KeyError Traceback (most recent call last) c:\Users\test\gpt-author\gpt_author_v2_1.ipynb Cell 7 line 5 3 num_chapters = 15 4 writing_style = "Clear and easily understandable, similar to a young adult novel. Lots of dialogue." ----> 5 novel, title, chapters, chapter_titles = write_fantasy_novel(prompt, num_chapters, writing_style, claude_true) 7 # Replace chapter descriptions with body text in chapter_titles 8 for i, chapter in enumerate(chapters):
c:\Users\test\gpt-author\gpt_author_v2_1.ipynb Cell 7 line 2 276 for i in range(num_chapters - 1): 277 print(f"Writing chapter {i+2}...") # + 2 because the first chapter was already added --> 279 chapter = write_chapter(novel, storyline, chapter_titles[i+1]) 280 try: 281 if len(str(chapter)) < 100:
c:\Users\test\gpt-author\gpt_author_v2_1.ipynb Cell 7 line 1 170 data = { 171 "model": "claude-2", 172 "prompt": prompt, 173 "max_tokens_to_sample": 5000, 174 } 176 response = requests.post(url, headers=headers, json=data) --> 178 print_step_costs_anthropic(prompt, response.json()['completion']) 180 return 'Chapter ' + response.json()['completion'].strip().split('```')[0].strip() 181 else:
KeyError: 'completion'
That error is happing on anthropic call and I am running without anthropic so I don't know exactly. I would recommended printing out response.json() before trying to extract completion. to see if anthropic is returning an error.
I replaced gpt-4-32k with GPT-3.5-Turbo-16k and so far so good
I tried to replace gpt-4-32k with GPT-3.5-Turbo-16k and I get this error now. I am sure I am missing something.
InvalidRequestError: The model GPT-3.5-Turbo-16k
does not exist
I tried to replace gpt-4-32k with GPT-3.5-Turbo-16k and I get this error now. I am sure I am missing something.
InvalidRequestError: The model
GPT-3.5-Turbo-16k
does not exist
can you paste/screenshot the full error code please?
This is what I am getting for an error.
This is what I am getting for an error.
can you try "gpt-3.5-turbo-16k" instead of "gpt-3.5-Turbo-16k"?
You need to use lowercase "gpt-3.5-turbo-16k" - it's case sensitive. Also, In order to access GPT-4, if your PAID (card linked to API billing**) account was created before August 2023, you must spend and have been billed at least $1.00 total in any given month to have been given access to GPT-4 APIs. After August, $0.50. Hope that helps!
I did use lowercase and still getting this error.
KeyError Traceback (most recent call last) c:\Users\zimba\gpt-author\gpt_author_v2_1.ipynb Cell 7 line 5 3 num_chapters = 15 4 writing_style = "Clear and easily understandable, similar to a young adult novel. Lots of dialogue." ----> 5 novel, title, chapters, chapter_titles = write_fantasy_novel(prompt, num_chapters, writing_style, claude_true) 7 # Replace chapter descriptions with body text in chapter_titles 8 for i, chapter in enumerate(chapters):
c:\Users\zimba\gpt-author\gpt_author_v2_1.ipynb Cell 7 line 2 276 for i in range(num_chapters - 1): 277 print(f"Writing chapter {i+2}...") # + 2 because the first chapter was already added --> 279 chapter = write_chapter(novel, storyline, chapter_titles[i+1]) 280 try: 281 if len(str(chapter)) < 100:
c:\Users\zimba\gpt-author\gpt_author_v2_1.ipynb Cell 7 line 1 170 data = { 171 "model": "claude-2", 172 "prompt": prompt, 173 "max_tokens_to_sample": 5000, 174 } 176 response = requests.post(url, headers=headers, json=data) --> 178 print_step_costs_anthropic(prompt, response.json()['completion']) 180 return 'Chapter ' + response.json()['completion'].strip().split('```')[0].strip() 181 else:
I am not sure if this is the correct place to post this; if not, I apologize in advance. I like trying out different AI tools, and currently, I am experimenting with GPT_Author. I have followed all the steps and read as much material as I can find, but I still can't get it to work. I have paid for GPT-4 and for the GPT API. When I run GPT Author, I see the step cost for each section, but in the end, I encounter an error. I am not a programmer, so this is very confusing.
InvalidRequestError Traceback (most recent call last) Cell 7 line 5
3 num_chapters = 15
4 writing_style = "Clear and easily understandable, similar to a young adult novel. Lots of dialogue." ---->
5 novel, title, chapters, chapter_titles = write_fantasy_novel(prompt, num_chapters, writing_style, claude_true)
7 # Replace chapter descriptions with body text in chapter_titles
8 for i, chapter in enumerate(chapters):
Cell 7 line 2
266 chapter_titles = ast.literal_eval(storyline)
269 novel = f"Storyline:\n{storyline}\n\n" -->
271 first_chapter = write_first_chapter(storyline, chapter_titles[0], writing_style.strip(), claude_true) 272 print('first chapter written')
273 novel += f"Chapter 1:\n{first_chapter}\n"
Cell 7 line 1
135 response = openai.ChatCompletion.create(
136 model="gpt-4",
137 messages=[ (...)
140 ]
141 )
143 print_step_costs(response, "gpt-4") -->
145 improved_response = openai.ChatCompletion.create(
...
766 rbody, rcode, resp.data, rheaders, stream_error=stream_error
767 )
768 return resp InvalidRequestError: The model
gpt-4-32k
does not exist or you do not have access to it. Learn more: https://help.openai.com/en/articles/7102672-how-can-i-access-gpt-4.