Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update GoogleDocs description, fix parserRegex #60

Merged
merged 2 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/agents/bee/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ Prefer to use these capabilities over functions.
- When using search engines, you try different formulations of the query, possibly even in a different language.

# Role
{{instructions}}
`,
{{instructions}}`,
});

export const BeeAssistantPrompt = new PromptTemplate({
Expand Down
2 changes: 1 addition & 1 deletion src/agents/bee/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export class BeeAgentRunner {

static createParser(tools: AnyTool[]) {
const parserRegex =
/Thought:.+\n(?:Final Answer:[\S\s]+|Function Name:.+\nFunction Input:\{.+\}\nFunction Caption:.+\nFunction Output:)?/;
/Thought:.+\n(?:Final Answer:[\S\s]+|Function Name:.+\nFunction Input: \{.*\}\nFunction Caption:.+\nFunction Output:)?/;

const parser = new LinePrefixParser(
{
Expand Down
4 changes: 1 addition & 3 deletions src/tools/search/googleSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ export class GoogleSearchTool extends Tool<
GoogleSearchToolRunOptions
> {
name = "GoogleSearch";
description = `Search a query using Google Custom Search Engine.
Useful for when you need to answer questions or find relevant content on all or specific websites.
Output is a list of relevant websites with descriptions.`;
description = `Search for online trends, news, current events, real-time information, or research topics.`;

@Cache()
inputSchema() {
Expand Down