1.0.0 โ€ข Published 3 months ago

apapiai-server v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months ago

๐ŸŒ Apapiai

Apapiai is a backend + frontend application interfacing with various services such as Google's Dialogflow and Vertex AI, OpenAI, Twitter API, and Yahoo Finance. It provides a cohesive API interface for AI-assisted operations. Primarily built in TypeScript, it's designed for socket communication for real-time interactions.

๐Ÿš€ Features

  • ๐Ÿค– Integration with Dialogflow CX for conversational AI.
  • ๐Ÿ’ป Support for Vertex AI for managing AI resources.
  • ๐ŸŒ Advanced scraping capabilities with Puppeteer.
  • ๐Ÿฆ Twitter API integration for social media interactions.
  • โšก Real-time communication through WebSockets.
  • ๐Ÿ“ˆ Financial data fetching and analysis with Yahoo Finance.
  • ๐Ÿง  OpenAI integration for GPT-4 capabilities.

๐Ÿ“‹ Prerequisites

Before setting up the project, ensure you have the following installed:

  • Node.js
  • npm (comes with Node.js)
  • Google Cloud credentials set up for Dialogflow CX and Vertex AI.
  • A Twitter Developer account and API keys for Twitter-related features.
  • OpenAI API keys for access to GPT-4.

๐Ÿ›  Installation

Clone the repository to your local machine:

git clone https://github.com/danielfebrero/Autonomous-Projects-API-AI
cd Autonomous-Projects-API-AI

Install the required dependencies:

npm install
cd webapp
npm install

Set up your environment variables by creating a .env file based on .env.example and filling in the necessary details.

๐Ÿ— Building and Running

To build the TypeScript files and prepare the server, run:

npm run build
cd webapp
npm run build

To start the server, execute:

npm start

To start the react app, in another terminal, execute:

cd webapp
npm start

For development, you can run the server using nodemon for hot reloading:

npm run dev

For running as a docker container, execute:

docker-compose up -d

๐Ÿงช Testing

The project uses Jest for unit testing. To run the tests, execute:

npm test

Make sure your tests are located in the appropriate directories and match the patterns set in "jest.testPathIgnorePatterns" to avoid running irrelevant scripts.

Overview

This Dialogflow CX agent is a conversational interface designed to assist users in navigating through various integrated applications such as web browsers, trading platforms, Twitter management, and a Unix-like terminal. It uses advanced natural language processing to interpret user inputs and respond with appropriate actions or information.

Available Pages and Commands

Pages

  • Terminal: Access a Unix-like terminal environment to execute commands.
  • Browser: Interact with a web browser, including taking screenshots of web pages.
  • Trading: Engage with a trading application for market-related actions.
  • Twitter (X app): Manage Twitter-related activities such as tweeting, login, and logout.
  • cTrader: Navigate to the cTrader platform for trading activities.
  • Auto-trade: Utilize an automated trading tool within the trading application.

How to Access Pages

To open a page, use the command ouvre followed by the name of the page, e.g., ouvre terminal.

How to Exit Pages

To exit a page, use the command ferme followed by the name of the page, e.g., ferme terminal.

Extra Commands

  • login or logout: Authenticate within an application.
  • tweet 'your message': Post a tweet on Twitter.
  • montre moi: Perform a specific action within the trading application, like viewing technical analysis or initiating auto-trade with a certain symbol.

Handling Unmatched Intents with GPT-4

When a user's input does not match any predefined intents, our agent harnesses the power of GPT-4 to generate an appropriate response. This enhances the agent's ability to handle a wide range of conversational topics and questions effectively.

Supported Languages

This agent supports interactions in both French and English.

Need Help?

For additional assistance or inquiries about the agent, please reach out to our support team through the contact information provided in this document.

๐Ÿ“œ License

This project is licensed under the ISC license.