Git Product home page Git Product logo

Comments (12)

elphin avatar elphin commented on August 19, 2024 1

Did just that; replaced every instance but I get the same error...
Any other suggestion?

from gpt-author.

zimba7768 avatar zimba7768 commented on August 19, 2024 1

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'

from gpt-author.

elphin avatar elphin commented on August 19, 2024

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?

from gpt-author.

StoneyPhenix avatar StoneyPhenix commented on August 19, 2024

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.

from gpt-author.

StoneyPhenix avatar StoneyPhenix commented on August 19, 2024

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.

from gpt-author.

fuleinist avatar fuleinist commented on August 19, 2024

I replaced gpt-4-32k with GPT-3.5-Turbo-16k and so far so good

from gpt-author.

zimba7768 avatar zimba7768 commented on August 19, 2024

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

from gpt-author.

fuleinist avatar fuleinist commented on August 19, 2024

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?

from gpt-author.

zimba7768 avatar zimba7768 commented on August 19, 2024

Screenshot 2023-10-08 051943

This is what I am getting for an error.

from gpt-author.

fuleinist avatar fuleinist commented on August 19, 2024

Screenshot 2023-10-08 051943

This is what I am getting for an error.

can you try "gpt-3.5-turbo-16k" instead of "gpt-3.5-Turbo-16k"?

from gpt-author.

simulanics avatar simulanics commented on August 19, 2024

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!

from gpt-author.

zimba7768 avatar zimba7768 commented on August 19, 2024

I did use lowercase and still getting this error.

Step Cost (OpenAI): 0.1167
generated plots
Step Cost (OpenAI): 0.16626000000000002
selected best plot
Step Cost (OpenAI): 0.12078
plot improved
Step Cost (OpenAI): 0.03702
title generated
Generating storyline with chapters and high-level details...
Step Cost (OpenAI): 0.12096
Step Cost (OpenAI): 0.17178
storyline generated
Step Cost (OpenAI): 0.14802
Step Cost (OpenAI): 0.14802
first chapter written
Writing chapter 2...

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:

from gpt-author.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.