Skip to content

Commit b56fe7e

Browse files
committed
chore: temp example clean-up
1 parent 2e731a4 commit b56fe7e

File tree

1 file changed

+1
-47
lines changed

1 file changed

+1
-47
lines changed

example/flows.ts

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import s from 'dedent'
2-
import { forEach, oneOf, parallel, sequence } from 'flows-ai/flows'
1+
import { forEach, parallel, sequence } from 'flows-ai/flows'
32
import { z } from 'zod'
43

54
/**
@@ -78,48 +77,3 @@ export const organizationAnalysisWithSlackMessageFlow = sequence([
7877
input: `Send the report to the channel "${process.env['SLACK_CHANNEL_ID']}"`,
7978
},
8079
])
81-
82-
/**
83-
* Flow for analyzing newsletter content and creating summaries
84-
*/
85-
export const newsletterSummaryFlow = sequence([
86-
{
87-
agent: 'contentAgent',
88-
input: s`
89-
Extract all links from the provided newsletter URL.
90-
For each link, determine if it is an article (📜) or release (📦).
91-
Return first 5 links with URL whose type is either "article" or "release".
92-
Skip any links that point to "x.com" or "twitter.com".
93-
`,
94-
},
95-
forEach({
96-
item: z.object({
97-
url: z.string().describe('The URL of the content'),
98-
type: z.enum(['article', 'release']).describe('The type of content'),
99-
}),
100-
input: oneOf([
101-
{
102-
when: 'It is an article',
103-
input: {
104-
agent: 'contentAgent',
105-
input: 'Create a bullet-point summary of the key points from this article.',
106-
},
107-
},
108-
{
109-
when: 'It is a release',
110-
input: {
111-
agent: 'contentAgent',
112-
input:
113-
'Analyze the release notes, identify any breaking changes, and highlight the most important new feature.',
114-
},
115-
},
116-
]),
117-
}),
118-
{
119-
agent: 'slackAgent',
120-
input: s`
121-
Send all summaries to the channel "${process.env['SLACK_CHANNEL_ID']}".
122-
The message must start with the newsletter issue number.
123-
`,
124-
},
125-
])

0 commit comments

Comments
 (0)