Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfbcb82f

Browse files
committed
nvidia marketing strategy example
1 parent221a52f commitfbcb82f

File tree

13 files changed

+524
-1
lines changed

13 files changed

+524
-1
lines changed

‎nvidia_models/intro/.gitignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
.DS_Store
33
__pycache__
44
.venv
5-
poetry.lock
5+
poetry.lock
6+
.ruff_cache
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.env
2+
.DS_Store
3+
__pycache__
4+
.venv
5+
poetry.lock
6+
.ruff_cache
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
.PHONY: all format lint test tests integration_tests help
2+
3+
# Default target executed when no arguments are given to make.
4+
all: help
5+
6+
install:## Install the poetry environment and dependencies
7+
poetry install --no-root
8+
9+
clean:## Clean up cache directories and build artifacts
10+
find. -type d -name"__pycache__" -exec rm -rf {} +
11+
find. -type d -name"*.pyc" -exec rm -rf {} +
12+
find. -type d -name".ruff_cache" -exec rm -rf {} +
13+
find. -type d -name".pytest_cache" -exec rm -rf {} +
14+
find. -type d -name".coverage" -exec rm -rf {} +
15+
rm -rf dist/
16+
rm -rf build/
17+
18+
######################
19+
# LINTING AND FORMATTING
20+
######################
21+
22+
# Define a variable for Python and notebook files.
23+
PYTHON_FILES=.
24+
MYPY_CACHE=.mypy_cache
25+
lint:## Run code quality tools
26+
poetry run ruff check$(PYTHON_FILES)
27+
poetry run ruff format$(PYTHON_FILES) --check
28+
29+
format:## Format code using ruff
30+
poetry run ruff format$(PYTHON_FILES)
31+
poetry run ruff check$(PYTHON_FILES) --fix
32+
33+
######################
34+
# HELP
35+
######################
36+
37+
help:
38+
@echo'----'
39+
@echo'format - run code formatters'
40+
@echo'lint - run linters'
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
#AI Crew for Marketing Strategy
3+
##Introduction
4+
This project demonstrates the use of the CrewAI framework to automate the creation of a marketing strategy. CrewAI orchestrates autonomous AI agents, enabling them to collaborate and execute complex tasks efficiently.
5+
6+
By[@joaomdmoura](https://x.com/joaomdmoura)
7+
8+
-[CrewAI Framework](#crewai-framework)
9+
-[Running the script](#running-the-script)
10+
-[Details & Explanation](#details--explanation)
11+
-[Contributing](#contributing)
12+
-[Support and Contact](#support-and-contact)
13+
-[License](#license)
14+
15+
##CrewAI Framework
16+
CrewAI is designed to facilitate the collaboration of role-playing AI agents. In this example, these agents work together to create a comprehensive marketing strategy and develop compelling marketing content.
17+
18+
##Running the Script
19+
It uses GPT-4o by default so you should have access to that to run it.
20+
21+
***Disclaimer:** This will use gpt-4o unless you change it to use a different model, and by doing so it may incur in different costs.*
22+
23+
-**Configure Environment**: Copy`.env.example` and set up the environment variables for[OpenAI](https://platform.openai.com/api-keys) and other tools as needed, like[Serper](serper.dev).
24+
-**Install Dependencies**: Run`poetry lock && poetry install`.
25+
-**Customize**: Modify`src/marketing_posts/main.py` to add custom inputs for your agents and tasks.
26+
-**Customize Further**: Check`src/marketing_posts/config/agents.yaml` to update your agents and`src/marketing_posts/config/tasks.yaml` to update your tasks.
27+
-**Execute the Script**: Run`poetry run marketing_posts` and input your project details.
28+
29+
##Details & Explanation
30+
-**Running the Script**: Execute`poetry run marketing_posts`. The script will leverage the CrewAI framework to generate a detailed marketing strategy.
31+
-**Key Components**:
32+
-`src/marketing_posts/main.py`: Main script file.
33+
-`src/marketing_posts/crew.py`: Main crew file where agents and tasks come together, and the main logic is executed.
34+
-`src/marketing_posts/config/agents.yaml`: Configuration file for defining agents.
35+
-`src/marketing_posts/config/tasks.yaml`: Configuration file for defining tasks.
36+
-`src/marketing_posts/tools`: Contains tool classes used by the agents.
37+
38+
##License
39+
This project is released under the MIT License.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[tool.poetry]
2+
name ="marketing_posts"
3+
version ="0.1.0"
4+
description ="marketing-posts using crewAI"
5+
authors = ["Your Name <you@example.com>"]
6+
7+
[tool.poetry.dependencies]
8+
python =">=3.10,<=3.13"
9+
langchain-nvidia-ai-endpoints ="^0.3.5"
10+
python-dotenv ="^1.0.1"
11+
crewai ="^0.80.0"
12+
crewai-tools ="^0.14.0"
13+
14+
[tool.poetry.scripts]
15+
marketing_posts ="marketing_posts.main:run"
16+
train ="marketing_posts.main:train"
17+
18+
[build-system]
19+
requires = ["poetry-core"]
20+
build-backend ="poetry.core.masonry.api"
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
#
3+
# This script searches for lines starting with "import pydantic" or "from pydantic"
4+
# in tracked files within a Git repository.
5+
#
6+
# Usage: ./scripts/check_pydantic.sh /path/to/repository
7+
8+
# Check if a path argument is provided
9+
if [$#-ne 1 ];then
10+
echo"Usage:$0 /path/to/repository"
11+
exit 1
12+
fi
13+
14+
repository_path="$1"
15+
16+
# Search for lines matching the pattern within the specified repository
17+
result=$(git -C"$repository_path" grep -E'^import pydantic|^from pydantic')
18+
19+
# Check if any matching lines were found
20+
if [-n"$result" ];then
21+
echo"ERROR: The following lines need to be updated:"
22+
echo"$result"
23+
echo"Please replace the code with an import from langchain_core.pydantic_v1."
24+
echo"For example, replace 'from pydantic import BaseModel'"
25+
echo"with 'from langchain_core.pydantic_v1 import BaseModel'"
26+
exit 1
27+
fi
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
set -eu
4+
5+
# Initialize a variable to keep track of errors
6+
errors=0
7+
8+
# make sure not importing from langchain or langchain_experimental
9+
git --no-pager grep'^from langchain\.'.&& errors=$((errors+1))
10+
git --no-pager grep'^from langchain_experimental\.'.&& errors=$((errors+1))
11+
12+
# Decide on an exit status based on the errors
13+
if ["$errors"-gt 0 ];then
14+
exit 1
15+
else
16+
exit 0
17+
fi

‎nvidia_models/marketing_strategy/src/marketing_posts/__init__.py‎

Whitespace-only changes.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
lead_market_analyst:
2+
role:>
3+
Lead Market Analyst
4+
goal:>
5+
Conduct amazing analysis of the products and competitors, providing in-depth
6+
insights to guide marketing strategies.
7+
backstory:>
8+
As the Lead Market Analyst at a premier digital marketing firm, you specialize
9+
in dissecting online business landscapes.
10+
11+
chief_marketing_strategist:
12+
role:>
13+
Chief Marketing Strategist
14+
goal:>
15+
Synthesize amazing insights from product analysis to formulate incredible
16+
marketing strategies.
17+
backstory:>
18+
You are the Chief Marketing Strategist at a leading digital marketing agency,
19+
known for crafting bespoke strategies that drive success.
20+
21+
creative_content_creator:
22+
role:>
23+
Creative Content Creator
24+
goal:>
25+
Develop compelling and innovative content for social media campaigns, with a
26+
focus on creating high-impact ad copies.
27+
backstory:>
28+
As a Creative Content Creator at a top-tier digital marketing agency, you
29+
excel in crafting narratives that resonate with audiences. Your expertise
30+
lies in turning marketing strategies into engaging stories and visual
31+
content that capture attention and inspire action.
32+
33+
chief_creative_director:
34+
role:>
35+
Chief Creative Director
36+
goal:>
37+
Oversee the work done by your team to make sure it is the best possible and
38+
aligned with the product goals, review, approve, ask clarifying questions or
39+
delegate follow-up work if necessary.
40+
backstory:>
41+
You are the Chief Content Officer at a leading digital marketing agency
42+
specializing in product branding. You ensure your team crafts the best
43+
possible content for the customer.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
research_task:
2+
description:>
3+
Conduct a thorough research about the customer and competitors in the context
4+
of {customer_domain}.
5+
Make sure you find any interesting and relevant information given the
6+
current year is 2024.
7+
We are working with them on the following project: {project_description}.
8+
expected_output:>
9+
A complete report on the customer and their customers and competitors,
10+
including their demographics, preferences, market positioning and audience engagement.
11+
12+
project_understanding_task:
13+
description:>
14+
Understand the project details and the target audience for
15+
{project_description}.
16+
Review any provided materials and gather additional information as needed.
17+
expected_output:>
18+
A detailed summary of the project and a profile of the target audience.
19+
20+
marketing_strategy_task:
21+
description:>
22+
Formulate a comprehensive marketing strategy for the project
23+
{project_description} of the customer {customer_domain}.
24+
Use the insights from the research task and the project understanding
25+
task to create a high-quality strategy.
26+
expected_output:>
27+
A detailed marketing strategy document that outlines the goals, target
28+
audience, key messages, and proposed tactics, make sure to have name, tatics, channels and KPIs
29+
30+
campaign_idea_task:
31+
description:>
32+
Develop creative marketing campaign ideas for {project_description}.
33+
Ensure the ideas are innovative, engaging, and aligned with the overall marketing strategy.
34+
expected_output:>
35+
A list of 5 campaign ideas, each with a brief description and expected impact.
36+
37+
copy_creation_task:
38+
description:>
39+
Create marketing copies based on the approved campaign ideas for {project_description}.
40+
Ensure the copies are compelling, clear, and tailored to the target audience.
41+
expected_output:>
42+
Marketing copies for each campaign idea.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp