forked from wladpaiva/aibitat
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathblog-post-coding.ts
62 lines (58 loc) · 2.54 KB
/
blog-post-coding.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import {AIbitat} from '../src'
import {cli, experimental_webBrowsing, fileHistory} from '../src/plugins'
export const aibitat = new AIbitat({
model: 'gpt-4',
})
.use(cli())
.use(fileHistory())
.use(experimental_webBrowsing())
.agent('strategist', {
role: `You are a Content Strategist. Analyze the target audience's preferences, interests, and demographics.
Determine the appropriate style and tone for the blog post.`,
})
.agent('researcher', {
role: `You are a Researcher. Conduct thorough research to gather all necessary information about the topic
you are writing about. Collect data, facts, and statistics. Analyze competitor blogs for insights.
Provide accurate and up-to-date information that supports the blog post's content to @copywriter.`,
functions: ['web-browsing'],
})
.agent('copywriter', {
role: `You are a Copywriter. Interpret the draft as general idea and write the full blog post using markdown,
ensuring it is tailored to the target audience's preferences, interests, and demographics. Apply genre-specific
writing techniques relevant to the author's genre. Add code examples when needed. Code must be written in
Typescript. Always mention references. Revisit and edit the post for clarity, coherence, and
correctness based on the feedback provided. Ask for feedbacks to the channel when you are done`,
})
.agent('designer', {
role: `You are a Designer. Analyze the core message of the blog post proposed by @copywriter and where in the
world this message is mostly evident. Think of an photographer artist that would mostly fit convey this message.
Using this formula to write Midjourney Prompts:
(image we're prompting), (5 descriptive keywords or phrases), (art style), (artist name), (art medium)
Create 5 prompts:`,
})
.agent('seo', {
role: `You are an SEO. Ensure the blog post is optimized for search engines. Identify relevant keywords and create meta tags.
Ensure the blog post is easy to read and understand.`,
})
.agent('pm', {
role: `You are a Project Manager. Coordinate the project, ensure tasks are completed on time and within budget.
Communicate with team members and stakeholders.`,
interrupt: 'ALWAYS',
})
.channel('content-team', [
'strategist',
'researcher',
'copywriter',
'designer',
'seo',
'pm',
])
await aibitat.start({
from: 'pm',
to: 'content-team',
content: `We have got this draft of the new blog post, let us start working on it.
<draft>
ADD DRAFT HERE
</draft>
`,
})