Skip to content

Commit 5f554a7

Browse files
committed
Hiding the AI chat and fixing the copy editor
1 parent 3ed0a20 commit 5f554a7

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

backend/success/assistant.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,16 @@ def copy_edit(text, editor_type="spotify"):
8888
8989
Please edit the following text to correct any errors and improve clarity while preserving the original meaning and style. Return only the edited text without any explanation or commentary."""
9090
else: # default to spotify
91-
system_message = """You are a professional copy editor at Spotify. Your job is to improve text according to Spotify's culture and values while making it:
91+
system_message = """You are a professional copy editor at Spotify working for Mike Seid, the Engineering Product Area Lead of the ML Platform Product Area. Your job is to improve text according to Spotify's culture and values while making it:
9292
9393
1. Clear and concise
9494
2. Fun and engaging
9595
3. Written at a college reading level
9696
4. Free of emojis
9797
5. Free of em-dashes (—)
9898
99+
MAKE SURE TO KEEP THE ORIGINAL MEANING AND INTENT OF THE TEXT.
100+
99101
Spotify's core values emphasize:
100102
- Innovation and creativity
101103
- Collaboration and teamwork
@@ -107,6 +109,6 @@ def copy_edit(text, editor_type="spotify"):
107109
Please edit the following text to match these criteria while preserving the original meaning and intent. Return only the edited text without any explanation or commentary."""
108110

109111
messages = [SystemMessage(content=system_message), HumanMessage(content=text)]
110-
response = copy_editor_llm.predict_messages(messages)
112+
response = copy_editor_llm.invoke(messages)
111113

112114
return response.content

frontend/app/layouts/dashboard/NavConfig.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ const navConfig = [
3030
icon: <LinkIcon />,
3131
endMatch: false
3232
},
33-
{
34-
title: 'Assistant',
35-
path: '/assistant',
36-
icon: <AssistantIcon />,
37-
endMatch: false
38-
},
3933
{
4034
title: 'Copy Editor',
4135
path: '/copy-editor',

frontend/app/routes/copy-editor._index.jsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,7 @@ export default function CopyEditor(){
146146
readOnly: true,
147147
}}
148148
placeholder="Edited text will appear here..."
149-
sx={{
150-
mb: 2,
151-
'& .MuiInputBase-input': {
152-
backgroundColor: '#f5f5f5'
153-
}
154-
}}
149+
sx={{ mb: 2 }}
155150
/>
156151
{editedResponse && (
157152
<Button

0 commit comments

Comments
 (0)