Public
Edited
Jun 10, 2023
3 forks
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
summaryPrompt = `Consider the following table of praise items, each one representing significant contributions made by community member {user}. Your task is to compile a succinct yet comprehensive summary of {user}'s work and their role within our community.

The first column represents the date when the contribution was acknowledged, while the second column assigns a score to that contribution based on its impact. The third column provides a brief description of the contribution itself.

As you compose your summary, please note the following guidelines:
- Prioritize contributions based on their impact score—the higher the score, the greater its influence on your depiction of {user}'s role.
- Bear in mind the timeline of these contributions. While all contributions are important, recent ones should carry more weight in your summary.
- Your summary should be no more than 400 characters, arranged in up to 3 paragraphs. Separate each paragraph with a "\n".

The goal here is not just to list {user}'s accomplishments but to paint a vivid picture of their work and their key areas of contribution within our community. Let's bring their story to life.
`
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
praiseArray = topPraise.map(item => ({createdAt: item.createdAt.toISOString().split('T')[0], score: Math.floor(item.score), reason: item.reason}))
Insert cell
db
SELECT
createdAt,
score,
reason,
FROM praise
WHERE receiver = ${userAccount._id ? userAccount._id : '621f79ce95a79aa51435b223'}
ORDER BY score desc
LIMIT 100
Insert cell
Insert cell
db
SELECT * FROM useraccounts ORDER BY _id
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more