Skip to content

Commit

Permalink
smol fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lalalune committed Feb 10, 2024
1 parent 24ac35a commit a78b2a8
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
GetEyeColorConversationExample3,
} from "./data.js";
import { UUID } from "crypto";
import { getRelationship } from "../src/index.js";

// create a UUID of 0s
const zeroUuid = "00000000-0000-0000-0000-000000000000";
Expand All @@ -41,21 +42,32 @@ describe("Agent Runtime", () => {

async function _cleanup() {
await runtime.messageManager.removeAllMemoriesByUserIds([
user.id,
user?.id as UUID,
zeroUuid,
]);
}

const data = await getRelationship({
supabase: runtime.supabase,
userA: user?.id as UUID,
userB: zeroUuid,
});

const room_id = data?.room_id;



async function _testBasicDetails() {
const conversation = GetTellMeAboutYourselfConversation1(user.id);
const conversation = GetTellMeAboutYourselfConversation1(user?.id as UUID);
for (let i = 0; i < conversation.length; i++) {
const c = conversation[i];
const bakedMemory = await runtime.messageManager.addEmbeddingToMemory({
user_id: c.user_id,
user_ids: [user.id, zeroUuid],
user_ids: [user?.id as UUID, zeroUuid],
content: {
content: c.content,
},
room_id
});
await runtime.messageManager.createMemory(bakedMemory);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@semantic-release/github": "^9.2.6",
"@semantic-release/npm": "^11.0.2",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/jest": "^27.5.0",
"@types/jest": "^27.5.2",
"@types/ms": "^0.7.34",
"@types/node": "^20.11.16",
"@typescript-eslint/eslint-plugin": "^4.33.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/agent/src/agent/evaluators/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import { parseJSONObjectFromText } from "../../lib/utils";
import { composeContext } from "../../lib/context";
import { AgentRuntime, getRelationship } from "../../lib";
import { Message, State } from "@/lib/types";
import { Message, State } from "../../lib/types";
import { UUID } from "crypto";

const template = `You are writing a profile for {{senderName}} based on their existing profile and ongoing conversations.
Expand Down
2 changes: 1 addition & 1 deletion packages/agent/src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export type Relationship = {

export type Content = {
content: string;
action: string;
action?: string;
};

export type Actor = {
Expand Down

0 comments on commit a78b2a8

Please sign in to comment.