mirror of
https://github.com/AJaySi/ALwrity.git
synced 2026-04-25 17:05:56 +03:00
[GH-ISSUE #14] Issue regarding messages result token #345
Labels
No labels
AI Content Agents
AI Content Strategy
AI Content planning
AI Marketing Tools
AI SEO
AI personalization
AI writer
ALwrity Copi-lot
Alwrity web search
Anthropic
DeepSeek
Gemini AI
Integration
LLM
OnBoarding
OnBoarding
RAG knowledgebase Memory
bug
documentation
enhancement
good first issue
help wanted
invalid
openai
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ALwrity#345
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @uniqueumesh on GitHub (Mar 26, 2024).
Original GitHub issue: https://github.com/AJaySi/ALwrity/issues/14
ERROR|metaphor_basic_neural_web_search.py:213:save_in_file| Error occurred while writing to the file: [Errno 2] No such file or directory: 'C:\Users\Dell\AI-Blog-Writer\workspace\web_research_reports\kanamo_peak_trek_in_details_2024-03-23_18-41-33'
INFO|combine_research_and_blog.py:75:blog_with_research| Calling OpenAI LLM.
2024-03-23 18:44:14,373-INFO-_client-1013-HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 400 Bad Request"
2024-03-23 18:44:14,388-ERROR-openai_chat_completion-53-OpenAI API Error: Error code: 400 - {'error': {'message': "This model's maximum context length is 16385 tokens. However, your messages resulted in 25664 tokens. Please reduce the length of the messages.", 'type': 'invalid_request_error', 'param': 'messages', 'code': 'context_length_exceeded'}}
PS C:\Users\Dell\AI-Blog-Writer>
Thank you for your help regarding this issue.
@uniqueumesh commented on GitHub (Mar 26, 2024):
INFO|get_blog_category.py:29:get_blog_categories| Generating blog categories for the given blog.
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [00:10<00:00, 1.00s/it]
2024-03-26 23:42:49,091-INFO-_client-1013-HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 404 Not Found"
INFO|get_blog_metadata.py:24:blog_metadata| Generated blog categories: None
@KlotzJesse commented on GitHub (Mar 26, 2024):
Quick fixes:
Error occurred while writing to the file: [Errno 2] No such file or directory:Fix for the missing folder, just create it for now, until the script is automatically generating the folder:
in your cloned project, inside the workspace folder, create a
web_research_reportsfolder.For the openai error
'code': 'context_length_exceeded:For now, just choose a model with a larger context range:
https://platform.openai.com/docs/models/continuous-model-upgrades
e.g.
gpt-4-0125-previewfound in following methods:
https://github.com/search?q=repo%3AAJaySi%2FAI-Blog-Writer+gpt-3.5&type=code
@A-jmesh
For long-term fixes, we should make a pull request so that the script is automatically creating the folders and make the model configurable in the config. As the config is atm not integrated as i've seen, it should both be tackled when this will be done.
@AJaySi commented on GitHub (Mar 27, 2024):
@KlotzJesse Thanks a lot.
As per your last comments, I am making config_main changes and will ask for your review.
Regards.