@@ -41,19 +41,18 @@ export const handler = async (
41
41
const linearUsers = await getLinearUsers ( { userId : currentUserId } )
42
42
43
43
const message = `
44
- You are an expert linguist creating concise task titles from messages in any language. Follow these steps:
45
-
46
- 1. TRANSLATION: If input is non-English, translate to English with maximum fidelity to:
47
- - Original intent and nuanced meaning
48
- - Cultural context and idiomatic expressions
49
- - Industry-specific terminology preservation
50
- Use professional translation standards (ISO 17100) for accuracy.
51
-
44
+ You are an expert linguist creating accurate task titles from messages in any language. Follow these steps:
45
+ the message is : ${ text } .
52
46
2. TITLE CREATION:
53
47
a. Start with simple, human-action verb (e.g., "Fix", "Update", "Review")
54
48
b. Maintain original message's key detail density
55
49
c. Strictly avoid AI-related terms like "optimize", "leverage", "streamline"
56
50
d. Should be sentence case.
51
+ e. Make sure you added the core issue (what is the issue) and how this issue was exactly created in title.
52
+ eg. Message: Dena please fix open DM chats on notification click, it’s working randomly for me.
53
+ Title: Fix open DM on notifications click
54
+ Message2: @Mo this message failed to translate. It was a long message from a zh user
55
+ Title2: Fix translation failure on long zh messages
57
56
58
57
3. LINEAR INTEGRATION:
59
58
Labels: ${ JSON . stringify ( labels . labels , null , 2 ) }
@@ -77,7 +76,8 @@ Key Requirements:
77
76
78
77
const response = await openaiClient ?. chat . completions . create ( {
79
78
messages : [ { role : "user" , content : message } ] ,
80
- model : "gpt-4" ,
79
+ model : "gpt-4o" ,
80
+ response_format : { type : "json_object" } ,
81
81
} )
82
82
83
83
if ( ! response ) {
0 commit comments