Skip to content

Commit

Permalink
ai save
Browse files Browse the repository at this point in the history
  • Loading branch information
1dolinski committed May 16, 2024
1 parent 29abe5f commit 8ca13f7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
12 changes: 11 additions & 1 deletion APIs/airstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,15 @@ const variables = {"fc_name":"1dolinski"};

const { data, error } = await fetchQuery(query, variables);

const warpcastData = data.FarcasterCasts.Cast.map((cast) => {
const obj = {
castedAtTimestamp: cast.castedAtTimestamp,
text: cast.text,
numberOfReplies: cast.numberOfReplies,
numberofLikes: cast.numberOfLikes,
channel: cast.channel && cast.channel.name || '',
};
return JSON.stringify(obj);
}).join("\n");

export default data;
export default warpcastData;
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

This project is a personal AI co-pilot designed to help users reach their goals with up-to-date memory about you. [See project documentation here](https://vibehut.gitbook.io/genai/)

### YouTube Videos

[Setup](https://www.youtube.com/watch?v=7KuwU8onDuk)
[Why Genai Is Better Than a Custom GPT: Extending with Personal Data + API Data](https://www.youtube.com/watch?v=7RD9n7OXpKE)

## Getting Started

To get started with the personal AI co-pilot, follow these steps:
Expand Down
16 changes: 0 additions & 16 deletions ai.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,6 @@ import OpenAI from 'openai';
import { promises as fs } from "fs";
import { exec } from "child_process";

import data from "./APIs/airstack.js";

const warpcastData = data.FarcasterCasts.Cast.map((cast) => {
const obj = {
castedAtTimestamp: cast.castedAtTimestamp,
text: cast.text,
numberOfReplies: cast.numberOfReplies,
numberofLikes: cast.numberOfLikes,
channel: cast.channel && cast.channel.name || '',
};
return JSON.stringify(obj);
}).join("\n");

const openai = new OpenAI({
apiKey: process.env['OPENAI_API_KEY'],
});
Expand Down Expand Up @@ -71,9 +58,6 @@ async function main() {
I have a few free hours, please outline what I should do. Please ask 3 questions that would help you help me better.
Recently I've also been posting on Warpcast, a web3 social media platform. Here are some of the posts I've made: ${warpcastData}
Give me feedback on my Warpcast posts
I have a set of files to track all the input data about me. Treat the data provided as truth:
I'll write out my thoughts in a file called daily.txt. Each day will have a header in the format of "*** MMM dd***" where MMM is the month and dd is the day.
I'll write out what I need to do, what I've done and what's upcoming in a file called todoUpcomingDone.txt
Expand Down

0 comments on commit 8ca13f7

Please sign in to comment.