forked from elizaOS/eliza
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
1,862 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
TEST_DATABASE_CLIENT=sqlite | ||
NODE_ENV=test | ||
MAIN_WALLET_ADDRESS=testwalletaddressfM3U31goWWrCpF59CHWNhnCJ9Vyh | ||
OPENAI_API_KEY=OPENAI_TEST_KEY |
1 change: 1 addition & 0 deletions
1
packages/core/cache/holderList_2weMjPLLybRMMva1fM3U31goWWrCpF59CHWNhnCJ9Vyh.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"data":[],"expiry":1731784276120} |
1 change: 1 addition & 0 deletions
1
packages/core/cache/tokenSecurity_2weMjPLLybRMMva1fM3U31goWWrCpF59CHWNhnCJ9Vyh.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"data":{"ownerBalance":"100","creatorBalance":"50","ownerPercentage":10,"creatorPercentage":5,"top10HolderBalance":"200","top10HolderPercent":20},"expiry":1731784617753} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { describe, expect, it } from "vitest"; | ||
|
||
describe("Basic Test Suite", () => { | ||
it("should run a basic test", () => { | ||
expect(true).toBe(true); | ||
}); | ||
|
||
it("should have access to environment variables", () => { | ||
expect(process.env.NODE_ENV).toBe("test"); | ||
expect(process.env.TEST_DATABASE_CLIENT).toBe("sqlite"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// getCachedEmbeddings | ||
// check cache.json for embedding where the key is a stringified version of the memory and the value is a number array | ||
import fs from "fs"; | ||
export const getCachedEmbeddings = async (text: string) => { | ||
if (!fs.existsSync("./embedding-cache.json")) { | ||
fs.writeFileSync("./embedding-cache.json", "{}"); | ||
} | ||
// read cache.json | ||
const cache = JSON.parse( | ||
fs.readFileSync("./embedding-cache.json", "utf8") as string | ||
); | ||
// stringify the memory | ||
const key = JSON.stringify(text); | ||
// return the value of the memory | ||
return cache[key]; | ||
}; | ||
|
||
export const writeCachedEmbedding = async ( | ||
text: string, | ||
embedding: number[] | ||
) => { | ||
// check if ./embedding-cache.json exists, if it doesn't, write {} to it | ||
if (!fs.existsSync("./embedding-cache.json")) { | ||
fs.writeFileSync("./embedding-cache.json", "{}"); | ||
} | ||
// read cache.json | ||
const cache = JSON.parse( | ||
fs.readFileSync("./embedding-cache.json", "utf8") as string | ||
); | ||
// stringify the memory | ||
const key = JSON.stringify(text); | ||
// write the value of the memory | ||
cache[key] = embedding; | ||
// write the cache to cache.json | ||
fs.writeFileSync("./embedding-cache.json", JSON.stringify(cache)); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { type UUID } from "@ai16z/eliza/src/types.ts"; | ||
|
||
export const SERVER_URL = "http://localhost:7998"; | ||
export const SUPABASE_URL = "https://pronvzrzfwsptkojvudd.supabase.co"; | ||
export const SUPABASE_ANON_KEY = | ||
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InByb252enJ6ZndzcHRrb2p2dWRkIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDY4NTYwNDcsImV4cCI6MjAyMjQzMjA0N30.I6_-XrqssUb2SWYg5DjsUqSodNS3_RPoET3-aPdqywM"; | ||
export const TEST_EMAIL = "[email protected]"; | ||
export const TEST_PASSWORD = "[email protected]"; | ||
export const TEST_EMAIL_2 = "[email protected]"; | ||
export const TEST_PASSWORD_2 = "[email protected]"; | ||
|
||
export const zeroUuid = "00000000-0000-0000-0000-000000000000" as UUID; |
Oops, something went wrong.