Comments (2)
This is (probably) a rate limit error. The notebook as provided has absolutely no error reporting/handling, which makes it difficult to be sure, but it's the most likely culprit. I would suggest, if you want to play around this and don't want to give Anthropic lots of money to increase your rate limit,
- request a smaller number of chapters
- in the line
chapter = generate_text(chapter_prompt, max_tokens=4000)
, lower the tokens to3000
If you want to delve into Python a bit more, I would also suggest adding some basic error handling to generate_text
, and maybe retry on a 429
or 529
error (which are hitting your rate limit and Anthropic's API being overloaded, respectively). I used something like
if response.status_code != 200:
print(f" ! got status code {response.status_code}")
print(response.json())
else:
response_text = response.json()['content'][0]['text']
return response_text.strip()
…but I also broke the notebook down into a series of cells rather than just one big script, because I wanted to be able to investigate just what's being generated along the way to see things like "how good is the outline Claude-Author has generated from the prompt" and "how well is Claude-Author following its own generated outline as it creates the chapters".
from gpt-author.
Thank you very much for your reply. I reduced the number of chapters to 10 and now the books are generated without errors)
from gpt-author.
Related Issues (20)
- InvalidRequestError: The model `gpt-4-32k` HOT 12
- use of Azure ChatGPT's API HOT 1
- Cannot find the generated book HOT 1
- Issue with OpenAI version HOT 1
- error 400 HOT 3
- Book II
- Example books using Claude Opus?
- Key content error HOT 9
- Support for the local models? HOT 2
- An update to the OpenAI access API version is required HOT 1
- anthropic cost HOT 2
- Error
- book help pls
- Support for more open source model
- KeyError: 'content' in Claude_Author.ipynb HOT 1
- Help in using the Claude Author neural network HOT 2
- Llama Support
- Rrrirjrjtjtjrjejrjtjen HOT 1
- Adel или девушка мечты
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpt-author.