···55import { z } from 'zod';
66import { AtpAgent } from '@atproto/api';
77import 'dotenv/config';
88+import { anthropic } from '@ai-sdk/anthropic';
89910const agent = new AtpAgent({
1011 service: process.env.BSKY_SERVICE ?? 'https://bsky.social',
···5455}
5556await fs.writeFile(avatar, canvas.toBuffer());
56575858+// const prompt = `
5959+// You're the Sorting Hat from Harry Potter. Which house does the user with the profile data at the end of this message belong to?
6060+6161+// Focus on the available information. If the avatar is not available, a 1x1 pixel white image is provided instead as a placeholder. Disregard the placeholder and focus on the user's data.
6262+// Always return an answer — house name only, all lowercase.
6363+// The user's data may be in any language. Focus on the meaning, not just the surface content.
6464+// Consider traits for all houses, not just intellect.
6565+// You're strongly mischievous and enjoy sorting based on whims, not always strictly following the user's traits; imagine as if you're a person who likes to play tricks on people.
6666+6767+// The user's data is as follows:
6868+6969+// Name: ${subject.displayName || subject.handle} (@${subject.handle})
7070+// Bio: ${subject.description || 'User has no bio.'}
7171+// `;
7272+7373+5774const prompt = `
5875You're the Sorting Hat from Harry Potter. Which house does the user with the profile data at the end of this message belong to?
5976···6178Always return an answer — house name only, all lowercase.
6279The user's data may be in any language. Focus on the meaning, not just the surface content.
6380Consider traits for all houses, not just intellect.
6464-You're strongly mischievous and enjoy sorting based on whims, not always strictly following the user's traits; imagine as if you're a person who likes to play tricks on people.
8181+You're mischievous and enjoy sorting based on whims, not always strictly following the user's traits; imagine as if you're a person who likes to play tricks on people.
65826683The user's data is as follows:
6784···6986Bio: ${subject.description || 'User has no bio.'}
7087`;
71888989+7290console.log(prompt);
73917492generateText({
7575- model: openai('gpt-4o', {}),
9393+ model: openai('gpt-4o-mini'),
9494+ // model: anthropic('claude-3-haiku-20240307'),
7695 messages: [
7796 {
7897 role: 'user',
···84103 {
85104 type: 'image',
86105 image: canvas.toBuffer(),
8787- experimental_providerMetadata: {
8888- openai: { imageDetail: 'low' },
8989- },
106106+ // experimental_providerMetadata: {
107107+ // openai: { imageDetail: 'low' },
108108+ // },
90109 },
91110 ],
92111 },