mirror of
https://github.com/crewAIInc/crewAI-examples.git
synced 2026-01-10 22:38:00 -05:00
Fixed various spelling or gramatical mistakes in code and in prompts
This commit is contained in:
@@ -44,7 +44,7 @@ class LandingPageCrew():
|
||||
return expanded_idea
|
||||
|
||||
def __choose_template(self, expanded_idea):
|
||||
choose_tempalte_taks = Task(
|
||||
choose_template_task = Task(
|
||||
description=TaskPrompts.choose_template().format(
|
||||
idea=self.idea
|
||||
),
|
||||
@@ -58,7 +58,7 @@ class LandingPageCrew():
|
||||
)
|
||||
crew = Crew(
|
||||
agents=[self.react_developer],
|
||||
tasks=[choose_tempalte_taks, update_page],
|
||||
tasks=[choose_template_task, update_page],
|
||||
verbose=True
|
||||
)
|
||||
components = crew.kickoff()
|
||||
@@ -117,7 +117,7 @@ class LandingPageCrew():
|
||||
verbose=True,
|
||||
tools=[
|
||||
SearchTools.search_internet,
|
||||
BrowserTools.scrape_and_summarize_kwebsite
|
||||
BrowserTools.scrape_and_summarize_website
|
||||
]
|
||||
)
|
||||
|
||||
@@ -126,7 +126,7 @@ class LandingPageCrew():
|
||||
verbose=True,
|
||||
tools=[
|
||||
SearchTools.search_internet,
|
||||
BrowserTools.scrape_and_summarize_kwebsite,
|
||||
BrowserTools.scrape_and_summarize_website,
|
||||
]
|
||||
)
|
||||
|
||||
@@ -135,7 +135,7 @@ class LandingPageCrew():
|
||||
verbose=True,
|
||||
tools=[
|
||||
SearchTools.search_internet,
|
||||
BrowserTools.scrape_and_summarize_kwebsite,
|
||||
BrowserTools.scrape_and_summarize_website,
|
||||
TemplateTools.learn_landing_page_options,
|
||||
TemplateTools.copy_landing_page_template_to_project_folder,
|
||||
FileTools.write_file
|
||||
@@ -146,7 +146,7 @@ class LandingPageCrew():
|
||||
**editor_config,
|
||||
tools=[
|
||||
SearchTools.search_internet,
|
||||
BrowserTools.scrape_and_summarize_kwebsite,
|
||||
BrowserTools.scrape_and_summarize_website,
|
||||
]
|
||||
)
|
||||
|
||||
@@ -173,9 +173,9 @@ if __name__ == "__main__":
|
||||
!!! NO TEMPLATES FOUND !!!
|
||||
! YOU MUST FORK THIS BEFORE USING IT !
|
||||
|
||||
Templates are not inlcuded as they are Tailwind templates.
|
||||
Templates are not included as they are Tailwind templates.
|
||||
Place Tailwind individual template folders in `./templates`,
|
||||
if you have a lincese you can download them at
|
||||
if you have a license you can download them at
|
||||
https://tailwindui.com/templates, their references are at
|
||||
`config/templates.json`.
|
||||
|
||||
|
||||
@@ -54,8 +54,8 @@ class TaskPrompts():
|
||||
|
||||
def update_page():
|
||||
return dedent("""
|
||||
READ the ./[choosen_template]/src/app/page.jsx OR
|
||||
./[choosen_template]/src/app/(main)/page.jsx (main with the parenthesis)
|
||||
READ the ./[chosen_template]/src/app/page.jsx OR
|
||||
./[chosen_template]/src/app/(main)/page.jsx (main with the parenthesis)
|
||||
to learn its content and then write an updated
|
||||
version to the filesystem that removes any
|
||||
section related components that are not in our
|
||||
@@ -126,7 +126,7 @@ class TaskPrompts():
|
||||
- Don't make up images, videos, gifs, icons, logos, etc.
|
||||
- keep the same style and tailwind classes.
|
||||
- MUST HAVE `'use client'` at the be beginning of the code.
|
||||
- href in buttons, links, NavLink and navigations should be `#`.
|
||||
- href in buttons, links, NavLinks, and navigations should be `#`.
|
||||
- NEVER WRITE \\n (newlines as string) on the file, just the code.
|
||||
- NEVER FORGET TO CLOSE THE FINAL BRACKET (}}) in the file.
|
||||
- Keep the same component imports and don't use new components.
|
||||
@@ -159,7 +159,7 @@ class TaskPrompts():
|
||||
- NEVER USE Apostrophes for contraction!
|
||||
- ALL COMPONENTS USED SHOULD BE IMPORTED.
|
||||
- MUST HAVE `'use client'` at the be beginning of the code.
|
||||
- href in buttons, links, NavLink and navigations should be `#`.
|
||||
- href in buttons, links, NavLinks, and navigations should be `#`.
|
||||
- NEVER WRITE \\n (newlines as string) on the file, just the code.
|
||||
- NEVER FORGET TO CLOSE THE FINAL BRACKET (}}) in the file.
|
||||
- NEVER USE COMPONENTS THAT ARE NOT IMPORTED.
|
||||
|
||||
@@ -10,7 +10,7 @@ from unstructured.partition.html import partition_html
|
||||
class BrowserTools():
|
||||
|
||||
@tool("Scrape website content")
|
||||
def scrape_and_summarize_kwebsite(website):
|
||||
def scrape_and_summarize_website(website):
|
||||
"""Useful to scrape and summarize a website content"""
|
||||
url = f"https://chrome.browserless.io/content?token={os.environ['BROWSERLESS_API_KEY']}"
|
||||
payload = json.dumps({"url": website})
|
||||
|
||||
@@ -18,11 +18,11 @@ class SearchTools():
|
||||
}
|
||||
response = requests.request("POST", url, headers=headers, data=payload)
|
||||
results = response.json()['organic']
|
||||
stirng = []
|
||||
string = []
|
||||
for result in results:
|
||||
stirng.append('\n'.join([
|
||||
string.append('\n'.join([
|
||||
f"Title: {result['title']}", f"Link: {result['link']}",
|
||||
f"Snippet: {result['snippet']}", "\n-----------------"
|
||||
]))
|
||||
|
||||
return '\n'.join(stirng)
|
||||
return '\n'.join(string)
|
||||
|
||||
@@ -90,4 +90,4 @@ class StockAnalysisTasks():
|
||||
)
|
||||
|
||||
def __tip_section(self):
|
||||
return "If you do your BEST WORK, I'll give you a $10,000 commision!"
|
||||
return "If you do your BEST WORK, I'll give you a $10,000 commission!"
|
||||
|
||||
@@ -5,8 +5,8 @@ class CalculatorTools():
|
||||
|
||||
@tool("Make a calcualtion")
|
||||
def calculate(operation):
|
||||
"""Useful to perform any mathematica calculations,
|
||||
like sum, minus, mutiplcation, division, etc.
|
||||
"""Useful to perform any mathematical calculations,
|
||||
like sum, minus, multiplication, division, etc.
|
||||
The input to this tool should be a mathematical
|
||||
expression, a couple examples are `200*7` or `5000/2*10`
|
||||
"""
|
||||
|
||||
@@ -58,15 +58,15 @@ if __name__ == "__main__":
|
||||
print('-------------------------------')
|
||||
location = input(
|
||||
dedent("""
|
||||
From where will you be travelling from?
|
||||
From where will you be traveling from?
|
||||
"""))
|
||||
cities = input(
|
||||
dedent("""
|
||||
What are the cities options you are intereseted in visiting?
|
||||
What are the cities options you are interested in visiting?
|
||||
"""))
|
||||
date_range = input(
|
||||
dedent("""
|
||||
What is the date range you are intereseted in traveling?
|
||||
What is the date range you are interested in traveling?
|
||||
"""))
|
||||
interests = input(
|
||||
dedent("""
|
||||
|
||||
@@ -5,7 +5,7 @@ class CalculatorTools():
|
||||
|
||||
@tool("Make a calcualtion")
|
||||
def calculate(operation):
|
||||
"""Useful to perform any mathematica calculations,
|
||||
"""Useful to perform any mathematical calculations,
|
||||
like sum, minus, multiplication, division, etc.
|
||||
The input to this tool should be a mathematical
|
||||
expression, a couple examples are `200*7` or `5000/2*10`
|
||||
|
||||
@@ -24,14 +24,14 @@ class SearchTools():
|
||||
return "Sorry, I couldn't find anything about that, there could be an error with you serper api key."
|
||||
else:
|
||||
results = response.json()['organic']
|
||||
stirng = []
|
||||
string = []
|
||||
for result in results[:top_result_to_return]:
|
||||
try:
|
||||
stirng.append('\n'.join([
|
||||
string.append('\n'.join([
|
||||
f"Title: {result['title']}", f"Link: {result['link']}",
|
||||
f"Snippet: {result['snippet']}", "\n-----------------"
|
||||
]))
|
||||
except KeyError:
|
||||
next
|
||||
|
||||
return '\n'.join(stirng)
|
||||
return '\n'.join(string)
|
||||
|
||||
@@ -38,7 +38,7 @@ class TripTasks():
|
||||
local would know.
|
||||
This guide should provide a thorough overview of what
|
||||
the city has to offer, including hidden gems, cultural
|
||||
hotspots, must-visit landmarks, weather forcast, and
|
||||
hotspots, must-visit landmarks, weather forecasts, and
|
||||
high level costs.
|
||||
|
||||
The final answer must be a comprehensive city guide,
|
||||
|
||||
Reference in New Issue
Block a user