Closed danieldanielecki closed 2 months ago
almost got it working in https://github.com/Ditectrev/Automation-Tools-for-Courses/commit/a4ef32852c8c3386f09da9097d9cbc1f85f67ce1, now just to format the text as content = response.json().get("text", "No text found")
returns No text found
.
A quick fix for getting the content out of the response and general python improvements Maybe continue the discussion there? @danieldanielecki
A quick fix for getting the content out of the response and general python improvements Maybe continue the discussion there? @danieldanielecki
yes
@emilosman almost there! -> https://github.com/Ditectrev/Automation-Tools-for-Courses/commit/444365be54b163566581887405f883f3e0a1acd7
another one, trying to find my way https://github.com/Ditectrev/Automation-Tools-for-Courses/commit/727ce7689f198bc9d63c708853c7c74f1e84c7c1
current status:
and in course_content.md
:
## {
### "HTML Course Table of Contents": {
No content available
### "Introduction": {
No content available
### "1.1 Overview": "",
No content available
### "1.2 What is HTML?": "",
No content available
### "1.3 Importance of HTML": "",
No content available
testing , but that was the best respond yet:
response JSON: {'model': 'mistral', 'created_at': '2024-07-10T10:52:38.8750772Z', 'response': '{\n "Course Title": "Terminal Fundamentals",\n "Table of Contents": {\n "Introduction": {\n "1.1": "Welcome and Course Overview",\n "1.2": "Prerequisites and What You\'ll Need"\n },\n "Chapter 1: Basics of the Terminal": {\n "2.1": "Understanding the Terminal",\n "2.2": "Navigating Directories",\n "2.3": "Basic Commands (ls, cd, pwd)",\n "2.4": "Creating and Deleting Files and Directories"\n },\n "Chapter 2: File Manipulation": {\n "3.1": "Viewing File Contents (cat, less, head, tail)",\n "3.2": "Editing Files (nano, vim)",\n "3.3": "Copying and Moving Files (cp, mv)",\n "3.4": "Archiving and Compressing Files (tar, gzip)"\n },\n "Chapter 3: Working with Text": {\n "4.1": "Searching Text (grep)",\n "4.2": "Counting Lines and Words (wc)",\n "4.3": "Replacing Text (sed, awk)"\n },\n "Chapter 4: Working with Shell Scripts": {\n "5.1": "Writing Basic Shell Scripts",\n "5.2": "Variables and Functions",\n "5.3": "Loops and Conditional Statements",\n "5.4": "Input and Output Redirection"\n },\n "Chapter 5: Navigating Networks": {\n "6.1": "SSH for Remote Access",\n "6.2": "Scp for File Transfer",\n "6.3": "Ping and Traceroute",\n "6.4": "Ssh Configurations"\n },\n "Chapter 6: Productivity Tools": {\n "7.1": "Introduction to Shell Autocompletion",\n "7.2": "Alias and Function Shortcuts",\n "7.3": "Tab Completion",\n "7.4": "Using Bash Profile for Customizations"\n },\n "Chapter 7: Troubleshooting and Best Practices": {\n "8.1": "Understanding Error Messages",\n "8.2": "Redirecting Output to a File (> and >>)",\n "8.3": "Using the History Command",\n "8.4": "Best Practices for Terminal Usage"\n },\n "Conclusion": {\n "9.1": "Course Summary",\n "9.2": "Further Reading and Resources",\n "9.3": "Quiz",\n "9.4": "Final Project",\n "9.5": "Feedback and Support"\n }\n }\n}', 'done': True, 'done_reason': 'stop', 'context': [3, 29473, 26843, 1032, 16081, 3169, 1070, 12105, 1122, 1032, 11532, 2243, 3131, 29493, 3258, 2959, 13226, 1072, 1851, ............. 1316, 781, 1123, 1113, 29551, 29491, 29518, 2032, 1113, 26401, 1056, 16753, 1066, 1032, 6952, 1093, 29535, 1072, 6890, 'total_duration': 837633926500, 'load_duration': 802865600, 'prompt_eval_count': 25, 'prompt_eval_duration': 8495059000, 'eval_count': 704, 'eval_duration': 593459660000}
@vitustockholm can you submit a PR?
missing is content generation, @emilosman @vitustockholm
even more https://github.com/Ditectrev/Automation-Tools-for-Courses/pull/11 improvement
It's not possible to generate entire book due to response size limitation, but it's possible to generate a detailed table of contents, and then each section separately by asking for a response for particular section. It's already a solid improvement, and it's all in Markdown format.
Ideally, it would create a table of contents first and then, based on feedback, improve/modify it slightly. Generating an entire book doesn't seem feasible for proper validation and improvement/modification of specific categories. We want to have it checked and read by a human with feedback s/he can provide. Hence, generating each chapter/main section separately would be the preferred way to proceed.
Content should be generated with code examples and occasionally with images when needed. However, for this part, a human can add an input for each chapter/main section, and then the AI will generate it.
Rest assured, the addition of code examples to CodeSandboxes can be done manually at a later stage. It might be overcomplicated to generate code snippets with CodeSandboxes, but as per Copilot, it's doable (maybe another issue after this is completed).
Other than programming books, we'd like to use it for cloud-related learning, like most of our materials. Not the questions & answers we have but also handbooks to properly teach the material.
It must be generated in
Markdown
format, in a format like https://github.com/Ditectrev/Awesome-HTML-Book-HyperText-Markup-Language-HTML