🔑 ID:
👨💻
🕒
This code is part of a tutorial I posted on my blog.
It helps you repurpose any type of content you have to your desired content with a single click.
The resources file imported into the script contains all the prompts used.
from SimplerLLM.tools.generic_loader import load_content from SimplerLLM.language.llm import LLM, LLMProvider from resources import text_to_x_thread, text_to_blog_post, text_to_medium_post, text_to_summary, text_to_newsletter #This can take a youtube video link, a blog post link, a csv file, etc... as input too file = load_content("https://www.youtube.com/watch?v=DAmL-b_c85c") #Edit the prompt name in accordance to what you want to convert it to final_prompt = text_to_blog_post.format(input = file.content) llm_instance = LLM.create(provider=LLMProvider.OPENAI, model_name="gpt-4o") response = llm_instance.generate_response(prompt=final_prompt, max_tokens=1000) with open("response.txt", "w", encoding='utf-8') as f: f.write(response)
If you’re encountering any problems or need further assistance with this code, we’re here to help! Join our community on the forum or Discord for support, tips, and discussion.
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |