GTM / create.py
yashbaidya's picture
..
191b48a
from openai import OpenAI
def set_openai_api_key(apikey):
return apikey, "✅ API key has been set and stored!"
system_message = "You are an expert in market research and you help startups and small businesses. You explain everything in east to understand way to new businessmans"
def create_gtm(api_key, product,location):
openai = OpenAI(api_key=api_key)
messages = [
{"role": "system", "content": system_message},
{"role": "user", "content": f"Act like a world class market research specialist. I want to promote {product} at {location}. Share a list of segments,market size, demand, potential geographies, decision-makers should target building a GTM strategy. Please give me the output in tabular format. Sort the segments in the decreasing order of the market size & demand."}
]
completion = openai.chat.completions.create(
model='gpt-4o',
messages=messages,
)
return completion.choices[0].message.content
def create_buyers_persona(api_key, product,location,segment):
openai = OpenAI(api_key=api_key)
messages = [
{"role": "system", "content": system_message},
{"role": "user", "content": f"Act like a World Class market Research Specilaist and do the task. I am selling {product} to {segment} at {location}. Build a Buyers Persona in tabular format classify the information based on Demography, Geo, Psychography, Behavior, also add buying barriers and buying triggers, Keywords they browse, Things they want to change, Their fear, etc."}
]
completion = openai.chat.completions.create(
model='gpt-4o',
messages=messages,
)
return completion.choices[0].message.content
def create_uvp(api_key, product,location,segment,goal,problem,solution):
openai = OpenAI(api_key=api_key)
messages = [
{"role": "system", "content": system_message},
{"role": "user", "content": f"I am selling {product} to {segment} in {location} I want you to act as a Marketing expert specializing in creating unique value propositions for {product} targeted to {segment} Craft a compelling and concise unique value proposition statement under 200 characters that highlights how to achieve {goal} without {problem} by utilizing {solution}."}
]
completion = openai.chat.completions.create(
model='gpt-4o',
messages=messages,
)
return completion.choices[0].message.content
def create_usp(api_key, product,location,segment):
openai = OpenAI(api_key=api_key)
messages = [
{"role": "system", "content": system_message},
{"role": "user", "content": f"My product is {product} selling to {segment} at {location} Please give the list of USPs & Group the USPs under 7Ps of Marketing."}
]
completion = openai.chat.completions.create(
model='gpt-4o',
messages=messages,
)
return completion.choices[0].message.content