You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/core/src/services/toolCallService.ts
+13-3Lines changed: 13 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -108,26 +108,36 @@ export class ToolCallService {
108
108
.join(' ');
109
109
110
110
constsystemPrompt=`You are a tool call generator. Your task is to generate a valid tool call for the tool named "${toolName}".
111
-
You will be provided with the schema of the tool and the last user message.
111
+
You will be provided with the schema of the tool and the chat history.
112
112
Generate a tool call that best helps with the user's request.
113
113
The tool schema is:
114
114
${formattedSchema}
115
115
116
116
Respond with only the JSON for the tool call. Do not include any other text or markdown.
117
+
118
+
The
117
119
`;
118
120
121
+
constreminder=`Remember!
122
+
You must look at the preceding chat history to understand the user's objective and current step in the process.
123
+
Only respond with the JSON for the tool call. Do not include any other text or markdown.`;
124
+
125
+
// TODO: add a user message which actually has the formatted schema and a reiteration of the user's objective and asks what command must be called. that will replace text: ''. maybe it's fine to have the schema and tool name in the system prompt.
0 commit comments