@@ -22,7 +22,9 @@ export class OpenAIClient {
2222
2323 private static readonly OPENAI_DEFAULT_PROMPT =
2424 process . env . OPENAI_DEFAULT_PROMPT ??
25- 'respond in discord-flavored markdown format. (for example, you CAN NOT use table and 4~6 level heading but you can use 1~3 level heading with #)\n' +
25+ 'respond in discord-flavored markdown format.\n' +
26+ 'you CAN NOT use 4~6 level heading but you can use 1~3 level heading with #\n' +
27+ 'you CAN NOT use table syntax for markdown\n' +
2628 'also you CAN NOT use bold, italic, underline etc in code block and code span\n' +
2729 'DO NOT use latex syntax, use unicode characters for math equation. use code block(```...```) and code span(`...`)\n' +
2830 'DO NOT append spaces before code block start and end\n' +
@@ -47,7 +49,6 @@ export class OpenAIClient {
4749 model : model . id ,
4850 tools : model . tools . map ( ( v ) => ( { type : v } ) ) as Tool [ ] ,
4951
50- tool_choice : model . tools . length > 0 ? 'required' : undefined ,
5152 reasoning :
5253 model . reasoningEffort !== undefined
5354 ? { effort : model . reasoningEffort , summary : 'detailed' }
@@ -58,6 +59,7 @@ export class OpenAIClient {
5859 ...chats . map ( ( v ) => v . convertToOpenAIResponse ( ) )
5960 ] ,
6061
62+ tool_choice : model . toolRequired === true ? 'required' : 'auto' ,
6163 truncation : 'auto' ,
6264
6365 user : userIdent . toString ( )
0 commit comments