Open howard989 opened 1 year ago
Very nice! looking at code here in min, gonna copy this down and play around with it.
My first thoughts are this: It is setup as an api atm, so I was forcing the creation through a @before_first_request decorator in the app.py.
So you will need to refresh to make that call.
2nd thought is, I'll look to make sure we have print statements in the right places for terminal output.
Are the editing functions actively working at the moment?
I want to ask before we go to far:
In reference to #14 - is this the right approach for batch updating content.
For example: how will this solution know which part of the page to update with a Markdown snippet?
I need a little time to experiment for a definite answer, but my findings so far seem to be postive.
This should allow us to manually insert new content at specific lines.
@howard989 Are these tags meant for SEO purposes? Or are these the template keys? (I'm just scanning through the code atm)
Comments make these self explanatory
For edit_file
we may have issues with the end_line
. We need to make sure that if we don't provide one it just auto fills in the correct spacing and doesn't mess with any of the other content. (Testing will confirm this for me)
Let's confirm: rather than very specific functions like "adding tags" - the focus ought to be adding any sort of generic block.
For example, in MKDocs, there is an entire block at the top of the page called "front matter" where you can more than just add tags. There are lots of configuration options that would be useful to batch update across many pages.
---
title: My Document
summary: A brief description of my document.
authors:
- Waylan Limberg
- Tom Christie
date: 2018-07-10
some_url: https://example.com
---
We could write custom html as templates for each page. The rest of that is all metadata. We are using the "Material" theme for MKDocs. So right now we are just directly uploading a bunch of markdown files right? And it takes those markdown files and applies them to our theme.
We could use that metadata to flush out some of the page for sure.
MKDocs allows you to pass custom HTML templates as docs, but if we are using a pre built theme and just uploading markdown, we just don't really need this. Unless you want to focus more on frontend development and designing the front (I think that should come later if at all)
Thank you! I refreshed it, and I tried running your original code and it printed output in the terminal. However, when I added some functions to the code, it seemed to get stuck in the terminal and didn't print anything, running indefinitely. This makes it difficult to determine if the edited functions are working or not.
@howard989 It sounds like there's a loop somewhere, or maybe it's trying to call an OpenAI completion at the same time and slowing it down?
These tags are not related to SEO purposes. The add_tags function takes a file path and a list of tags as input, and inserts them at the top of a markdown file. This function is used to add tags metadata to the markdown file, which can be used by a static site generator or other tools to categorize and organize content.
@howard989
the prompt_keys
are now set based on the actual template.md (always ignoring the {topic} for prompting)
Next step is to add a 'exclude_keywords' param so if you want to use custom templates you just pass the keywords to ignore.
What is the status of this @bigolboyyo @howard989?
Should I put it on the Next Release Board? Or Future Releases Board?
I am unable to find the codes in those files. Could you please let me know where they are currently located.
I have added some new functions for adding tags, inserting photos, and adding new page sections in three different files: app/app.py, app/models/content_generator.py, and app/utils/generator_utils.py. However, when I run the program using flask run, there is no output printed in the terminal.
I would greatly appreciate it if someone, particularly Wesley, could take a look and help me troubleshoot the issue.
Here is the link to my branch: https://github.com/howard989/data-magic-h/tree/add-functions.
Thank you very much.