Skip to content

Commit

Permalink
fix(agents): revert prompts.ts to main branch version for testing
Browse files Browse the repository at this point in the history
Ref: i-am-bee#121
Signed-off-by: Matias Molinas <[email protected]>
  • Loading branch information
matiasmolinas committed Dec 3, 2024
1 parent 1ae8284 commit 7f5ba18
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions src/agents/bee/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { PromptTemplate } from "@/template.js";
import { BaseMessageMeta } from "@/llms/primitives/message.js";
import { z } from "zod";

// Original BeeSystemPrompt
export const BeeSystemPrompt = new PromptTemplate({
schema: z.object({
instructions: z.string().default("You are a helpful assistant."),
Expand Down Expand Up @@ -102,41 +101,6 @@ Prefer to use these capabilities over functions.
{{instructions}}`,
});

// Extended BeeSystemPrompt with HumanTool support
export const BeeSystemPromptWithHumanTool = BeeSystemPrompt.fork((config) => {
return {
...config,
template: config.template
.replace(
"## Examples",
`## Examples
Message: I need advice.
Thought: The user's request is too general. I need to ask for more specifics.
Function Name: HumanTool
Function Input: { "message": "Could you please specify what you need advice on?" }
Function Output: // Waits for user input
Thought: The user has provided more details. I can now assist them.
Final Answer: [Provide the advice based on user's input]
Message: How is the weather?
Thought: The user's question is unclear as it lacks a location. I need to ask for clarification.
Function Name: HumanTool
Function Input: { "message": "Could you please specify the location for which you would like to know the weather?" }
Function Output: // Waits for user input
Thought: The user has provided the location. I can now retrieve the weather information.
Final Answer: [Provide the weather information based on user's input]
## Examples`,
)
.replace(
"# Instructions",
`# Instructions
When the message is unclear, incomplete, or lacks context, you must use the "HumanTool" function to ask for clarification. Always avoid guessing or providing incomplete answers without the user's input.`,
),
};
});

// Other prompts remain unchanged
export const BeeAssistantPrompt = new PromptTemplate({
schema: z
.object({
Expand Down

0 comments on commit 7f5ba18

Please sign in to comment.