Skip to content

Commit

Permalink
improve webbrowsing
Browse files Browse the repository at this point in the history
  • Loading branch information
wladpaiva committed Oct 22, 2023
1 parent aed887d commit 56eb06e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
12 changes: 4 additions & 8 deletions examples/5-web-browsing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,17 @@ export const aibitat = new AIbitat()
.use(cli())
.use(experimental_webBrowsing())
.use(fileHistory())
.agent('client', {
role: `You are a human assistant. Your job is to answer relevant question about the work.
Reply "TERMINATE" when the-strategist and the-researcher stop suggesting changes.`,
})
.agent('client', {})
.agent('the-researcher', {
role: `You are a content Researcher. You conduct thorough research on the chosen topic.
Collect data, facts, and statistics. Analyze competitor blogs for insights.
Provide accurate and up-to-date information that supports the blog post's content.`,
functions: ['web-browsing'],
model: 'gpt-4',
role: `You are a researcher. Your job is to research on the internet about the topic.`,
})

if (import.meta.main) {
await aibitat.start({
from: 'client',
to: 'the-researcher',
content: `Write a blog post about in Brazilian Portuguese to be posted on Medium.`,
content: `Write a blog post about the latest news in AI in Brazilian Portuguese to be posted on Medium.`,
})
}
3 changes: 2 additions & 1 deletion src/plugins/web-browsing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ export function experimental_webBrowsing({}: {} = {}) {

aibitat.function({
name: 'web-browsing',
description: 'Searches the internet for a given query.',
description:
'Searches for a given query online or navigate to a given url.',
parameters: {
$schema: 'http://json-schema.org/draft-07/schema#',
type: 'object',
Expand Down

0 comments on commit 56eb06e

Please sign in to comment.