brianjking commited on
Commit
411cdb8
1 Parent(s): 8432a78

update system msg and model

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -59,10 +59,10 @@ content_type = st.selectbox("Select content type:", ["Blog", "Tweet"])
59
  if st.button("Generate") and content_type:
60
  with st.spinner('Generating text...'):
61
  try:
62
- prompt = f"Write a blog about 500 words in length using {st.session_state['retrieved_text']}" if content_type == "Blog" else f"Compose a tweet using {st.session_state['retrieved_text']}"
63
- response = client.chat.completions.create(model="gpt-3.5-turbo-16k",
64
  messages=[
65
- {"role": "system", "content": "You are a helpful assistant."},
66
  {"role": "user", "content": prompt}
67
  ])
68
  generated_text = response.choices[0].message.content
 
59
  if st.button("Generate") and content_type:
60
  with st.spinner('Generating text...'):
61
  try:
62
+ prompt = f"Write an engaging blog that is about 500 words in length using the content from the product catalog to ground the content in factuaility. Here is the content: {st.session_state['retrieved_text']}" if content_type == "Blog" else f"Compose a tweet using {st.session_state['retrieved_text']}"
63
+ response = client.chat.completions.create(model="gpt-3.5-turbo-0125",
64
  messages=[
65
+ {"role": "system", "content": "You are a helpful assistant that writes compelling and interesting marketing copy such as blogs and tweets."},
66
  {"role": "user", "content": prompt}
67
  ])
68
  generated_text = response.choices[0].message.content