An API that creates and retrieves entertaining personas based a user's latest Bluesky posts.
Features
- Create personas of Bluesky users based on their last 50 original posts. Reposts, as well as posts that can't be summarized are excluded.
- Retrieve list of latest 20 personas added.
- Retrieve a persona by username.
Use Cases
- Create a custom GPT on OpenAI that consumes this API and allows one to interact with the personas, ask questions, find connections between personas, generate images, and more.
- Included is a
openapi.spec.yamlfile that describes the API for OpenAI and LLMs to use. - Note that the
/personifyPOST endpoint is protected by an API key and not included in the openAPI specification to avoid unbounded LLM costs if it were an open endpoint. Therefore new personas can only be created by trusted users.
- Included is a
Create a .env file with the following:
BLUESKY_USERNAME=
BLUESKY_PASSWORD=
ANTHROPIC_API_KEY=
API_KEY=
DATABASE_URL=
BLUESKY_USERNAME and BLUESKY_PASSWORD are the credentials for the Bluesky account that calls the Bluesky API.
ANTHROPIC_API_KEY is the API key for the Anthropic API.
API_KEY is the API key protecting the endpoint that creates personas since that costs money to use the LLM.
DATABASE_URL is the URL for the Postgres database.
Run:
yarn
yarn devRun all tests:
yarn testRun only the slow and expensive LLM tests:
yarn test-llmRun only the fast unit tests:
yarn test-unitHosted on Vercel. Add environment variables from above.
For example, create persona for brianfive.xyz via
curl -i -X POST http://localhost:3000/personify/brianfive.xyz?api_key=123