A comprehensive collection of AI-powered tools for automating your workflow
Watch the demo above to see the AI Tools Suite in action. Discover how these powerful tools can transform your workflow and boost productivity.
The AI Tools Suite is an integrated collection of AI-powered tools designed to automate various tasks using OpenAI's models, LangChain, and other powerful APIs. This project combines multiple functionalities into a single interface, allowing users to perform complex tasks with simple commands.
Automatically create notes from videos, generate code, and more.
Aggregate news articles and access internet information.
Convert Figma designs into functional HTML/CSS code.
Send emails with PDF attachments directly from the application.
This tool extracts audio from video files, transcribes it using OpenAI's Whisper model, and generates detailed notes from the transcript using GPT-4o-mini.
def video_to_notes(video_path):
# Extract audio from video
def extract_audio(video_path, audio_path):
video = VideoFileClip(video_path)
video.audio.write_audiofile(audio_path)
audio_path = "output_audio.wav"
extract_audio(video_path, audio_path)
# Transcribe audio chunks
def transcribe_audio_chunk(audio_chunk, chunk_number):
chunk_path = f"chunk{chunk_number}.wav"
audio_chunk.export(chunk_path, format="wav")
with open(chunk_path, 'rb') as audio_file:
response = openai.Audio.transcribe("whisper-1", audio_file)
os.remove(chunk_path) # Clean up the chunk file after transcribing
return response['text']
# Generate notes from transcribed text
def generate_notes(text, temperature=0.5):
response = openai.ChatCompletion.create(
model="gpt-4o-mini",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": f"Create detailed notes from the following text: {text}"}
],
temperature=temperature
)
return response.choices[0].message['content']
notes = generate_notes(transcript)
return notes
This component works by:
This tool extracts keywords from user queries, fetches relevant news articles using the News API, and processes the content to provide concise answers.
def news_aggregator(question):
def extract_keywords(query):
vectorizer = CountVectorizer(stop_words='english')
X = vectorizer.fit_transform([query])
return vectorizer.get_feature_names_out()
def fetch_news(keywords, language='en', limit=3):
base_url = 'https://api.thenewsapi.com/v1/news/all'
query = ' '.join(keywords) # Join keywords to form a search query
params = {
'api_token': NEWS_API_KEY,
'language': language,
'limit': limit,
'search': query
}
response = requests.get(base_url, params=params)
if response.status_code == 200:
return response.json().get('data', [])
else:
print(f"Error: {response.status_code}")
return []
# Generate response using the LLM
return generate_llm_response(question, article_contents)
This component operates by:
This tool connects to the Figma API, extracts design elements from a specified file, and generates corresponding HTML and CSS code.
def figma_to_html_css(figma_file_id):
def fetch_figma_design(figma_file_id):
headers = {'X-Figma-Token': FIGMA_API_KEY}
url = f'https://api.figma.com/v1/files/{figma_file_id}'
response = requests.get(url, headers=headers)
if response.status_code == 200:
return response.json()
else:
raise Exception(f"Failed to fetch data: {response.status_code}")
def extract_design_elements(design_data):
elements = []
for page in design_data['document']['children']:
for frame in page['children']:
element = {
'name': frame['name'],
'width': frame['absoluteBoundingBox']['width'],
'height': frame['absoluteBoundingBox']['height'],
'color': frame.get('backgroundColor', {}),
'font': frame.get('style', {}).get('fontFamily'),
'font_size': frame.get('style', {}).get('fontSize'),
}
elements.append(element)
return elements
def generate_code_from_design(design_element):
prompt = f"""
Convert the following design element into HTML and CSS:
Name: {design_element['name']}
Width: {design_element['width']}px
Height: {design_element['height']}px
Background Color: {design_element['color']}
Font: {design_element['font']}
Font Size: {design_element['font_size']}px
"""
response = openai.ChatCompletion.create(
model="gpt-4o-mini",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": prompt}
]
)
return response.choices[0].message['content'].strip()
This component works by:
This tool uses GPT-4o-mini to generate Python code based on natural language descriptions of the desired functionality.
def generate_code(prompt):
"""
Generates Python code based on the given prompt using GPT-4o-mini.
Parameters:
prompt (str): The prompt describing the task or code to be generated.
Returns:
str: The generated Python code as a string.
"""
try:
response = openai.ChatCompletion.create(
model="gpt-4o-mini",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": prompt}
]
)
generated_code = response.choices[0].message['content'].strip()
if generated_code:
# Optionally, save the generated code to a file
save_option = input("\nDo you want to save the generated code to a file? (y/n): ").lower()
if save_option == "y":
file_name = input("Enter the file name (e.g., generated_code.py): ")
with open(file_name, "w") as file:
file.write(generated_code)
print(f"Code saved to {file_name}")
return generated_code
except Exception as e:
return f"Error generating code: {str(e)}"
This component operates by:
This tool creates PDF documents from text content and sends them as email attachments to specified recipients.
def send_email_with_pdf(subject, body, recipients, text_for_pdf):
pdf_filename = "attachment.pdf"
create_pdf(text_for_pdf, pdf_filename)
msg = MIMEMultipart()
msg['From'] = EMAIL_ADDRESS
msg['Subject'] = subject
msg.attach(MIMEText(body, 'plain'))
with open(pdf_filename, "rb") as attachment:
part = MIMEBase('application', 'octet-stream')
part.set_payload(attachment.read())
encoders.encode_base64(part)
part.add_header('Content-Disposition', f"attachment; filename={pdf_filename}")
msg.attach(part)
try:
server = smtplib.SMTP('smtp.hostinger.com', 587)
server.starttls()
server.login(EMAIL_ADDRESS, EMAIL_PASSWORD)
for recipient in recipients:
msg['To'] = recipient
text = msg.as_string()
server.sendmail(EMAIL_ADDRESS, recipient, text)
server.quit()
os.remove(pdf_filename) # Clean up the PDF file
return "Email sent successfully!"
except Exception as e:
return f"Failed to send email: {e}"
This component works by:
This tool leverages LangChain and SerpAPI to retrieve and process information from the internet based on user queries.
def internet_access_tool_function(query):
"""
Function to run the agent with the provided query.
Parameters:
query (str): The input query for the agent.
Returns:
str: The response from the agent.
"""
return agent.run(query)
# Initialize the agent
tools = load_tools(["serpapi", "llm-math"], llm=llm_i) + [
save_to_directory_tool, video_to_notes_tool, news_aggregator_tool,
figma_to_html_css_tool, generate_code_tool, email_tool
]
agent = initialize_agent(tools, llm_i, agent="zero-shot-react-description", verbose=True)
This component operates by:
The AI Tools Suite has significant potential for expansion and advanced use cases:
The modular nature of this suite allows for easy integration with existing workflows and systems:
Future versions could include:
The AI Tools Suite can be tailored to specific industries: