Spaces:
Runtime error
Runtime error
Upload utils.py
Browse files12345671 unmodified line9101112131415161718194 unmodified lines2425262728293031import openaiimport osopenai.api_key = os.getenv("OPENAI_API_KEY")def generate_rtm(company, website):prompt = f"""1 unmodified lineProvide detailed RTM summary for {company} ({website}). Follow all steps from Part 1 through Part 4.Keep sections clearly labeled, and cite sources where possible."""response = openai.ChatCompletion.create(model="gpt-4",messages=[{"role": "user", "content": prompt}])return response['choices'][0]['message']['content']def generate_prospecting_message(linkedin_url, profile_context, rtm_context):prompt = f"""4 unmodified linesGenerate a short, strategic outreach message for the prospect (under 125 words). Frame it around a pain point or opportunity they would care about based on their role and the company context."""response = openai.ChatCompletion.create(model="gpt-4",messages=[{"role": "user", "content": prompt}])return response['choices'][0]['message']['content']12345671 unmodified line9101112131415161718194 unmodified lines2425262728293031import openaiimport osclient = openai.OpenAI(api_key=os.getenv("OPENAI_API_KEY"))def generate_rtm(company, website):prompt = f"""1 unmodified lineProvide detailed RTM summary for {company} ({website}). Follow all steps from Part 1 through Part 4.Keep sections clearly labeled, and cite sources where possible."""response = client.chat.completions.create(model="gpt-4",messages=[{"role": "user", "content": prompt}])return response.choices[0].message.contentdef generate_prospecting_message(linkedin_url, profile_context, rtm_context):prompt = f"""4 unmodified linesGenerate a short, strategic outreach message for the prospect (under 125 words). Frame it around a pain point or opportunity they would care about based on their role and the company context."""response = client.chat.completions.create(model="gpt-4",messages=[{"role": "user", "content": prompt}])return response.choices[0].message.content
utils.py+5-5