Skip to content

Commit

Permalink
Fix initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
fatihturker committed May 7, 2023
1 parent b38f234 commit 02c0bd1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion NPM-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## PI AGI: Personalized Artificial General Intelligence

[![Donate](https://img.shields.io/badge/Donate-Buy%20Me%20a%20Coffee-yellow.svg)](https://www.buymeacoffee.com/RwIpTEd)
[![Stars](https://img.shields.io/github/stars/fatihturker/PI-AGI.svg?style=flat-square)](https://github.com/fatihturker/PI-AGI/stargazers)
[![Stars](https://img.shields.io/github/stars/pi-agi/core.svg?style=flat-square)](https://github.com/pi-agi/core/stargazers)

Welcome to PI AGI, a groundbreaking project that aims to revolutionize the world of Artificial Intelligence. By developing a base for role-based AGIs (Artificial General Intelligences) that are personalized and optimized for specific tasks, we can unlock the true power and meaning of AGI. As we usher in a new era of AI-driven advancements, it's time for everyone to get ready and embrace the potential of personalized AGIs, which will play a transformative role in shaping our world and driving innovation across various domains.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## PI AGI: Personalized Artificial General Intelligence

[![Donate](https://img.shields.io/badge/Donate-Buy%20Me%20a%20Coffee-yellow.svg)](https://www.buymeacoffee.com/RwIpTEd)
[![Stars](https://img.shields.io/github/stars/fatihturker/PI-AGI.svg?style=flat-square)](https://github.com/fatihturker/PI-AGI/stargazers)
[![Stars](https://img.shields.io/github/stars/pi-agi/core.svg?style=flat-square)](https://github.com/pi-agi/core/stargazers)

Welcome to PI AGI, a groundbreaking project that aims to revolutionize the world of Artificial Intelligence. By developing a base for role-based AGIs (Artificial General Intelligences) that are personalized and optimized for specific tasks, we can unlock the true power and meaning of AGI. As we usher in a new era of AI-driven advancements, it's time for everyone to get ready and embrace the potential of personalized AGIs, which will play a transformative role in shaping our world and driving innovation across various domains.

Expand Down
23 changes: 18 additions & 5 deletions lib/agi/main.agi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { Action, ActionResponse } from '../interface/gpt.interface';
export class MainAGI<T extends ActionType> {
protected mainPrompt: string;
protected nextPrompt: string;
protected dirname: string;
protected taskDir: string;
protected ltmPath: string;
protected logPath: string;
Expand All @@ -41,31 +42,41 @@ export class MainAGI<T extends ActionType> {
this.consolidationId = '';
this.taskDir = '';
this.logPath = '';
this.dirname = '';
}

/**
* Initializes the AGI.
*/
protected initialize(dirname: string, consolidationId: string) {
this.consolidationId = consolidationId;
this.dirname = dirname;

this.ltmPath = path.join(
dirname,
this.dirname,
'..',
'..',
'output',
'memory',
consolidationId + '.json'
this.consolidationId + '.json'
);

this.logPath = path.join(
dirname,
this.dirname,
'..',
'..',
'output',
'log',
consolidationId + '.log'
this.consolidationId + '.log'
);

this.taskDir = path.join(dirname, '..', '..', 'task', consolidationId);
this.taskDir = path.join(
this.dirname,
'..',
'..',
'task',
this.consolidationId
);
}

/**
Expand All @@ -75,6 +86,8 @@ export class MainAGI<T extends ActionType> {
* @returns A promise that resolves when the action is completed.
*/
public start = async (content: Content): Promise<any> => {
this.initialize(this.dirname, this.consolidationId);

const loggerUtil = new LoggerUtil(this.consolidationId, this.logPath);

await this.clearFolders(loggerUtil);
Expand Down

0 comments on commit 02c0bd1

Please sign in to comment.