Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add missing improvements from PR #1163 to PR #1162 #1164

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ cd composio/js/examples/market_research_agent

2. Install dependencies:
```bash
pnpm install @langchain @langchain/openai composio-core express
pnpm install
```

Required dependencies:
- `@langchain/openai`: For OpenAI model integration
- `composio-core`: For Composio toolset functionality
- `express`: For web server functionality (if running as a service)

## Usage

1. Navigate to the project directory:
Expand All @@ -23,7 +28,11 @@ pnpm install @langchain @langchain/openai composio-core express
cd path/to/your/project
```

2. Add your environment variables in a `.env` file. Make sure to include the necessary API keys, such as `COMPOSIO_API_KEY` and `OPENAI_API_KEY`.
2. Set up environment variables:
- Copy `.env.example` to `.env`
- Fill in the required API keys:
- `COMPOSIO_API_KEY`: Your Composio API key for tool access
- `OPENAI_API_KEY`: Your OpenAI API key for GPT-4 model access

3. Execute the application:

Expand All @@ -33,4 +42,4 @@ pnpm install @langchain @langchain/openai composio-core express

## Customization

You can customize the domain of market research agent by modifying the `domain` variable in the `demo.mjs` file.
You can customize the domain of market research agent by modifying the `domain` variable in the `demo.mjs` file.
61 changes: 61 additions & 0 deletions js/examples/portfolio-generator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Portfolio Generator Demo

This demo shows how to create a portfolio website using Composio and Vercel AI. The agent generates ReactJS code for a portfolio website based on your professional information and saves it to a Google Doc.

## Features
- Generates ReactJS code for a portfolio website
- Creates folder structure and setup instructions
- Saves output to Google Docs
- Uses Code Interpreter for code generation
- Integrates with Google Docs for documentation

## Setup

1. Clone the repository and navigate to this folder:
```bash
git clone https://github.com/composioHQ/composio.git
cd composio/js/examples/portfolio-generator
```

2. Install dependencies:
```bash
pnpm install
```

Required dependencies:
- `@ai-sdk/openai`: For OpenAI model integration and GPT-4 access
- `ai`: For text generation functionality
- `composio-core`: For Composio toolset and entity management
- `dotenv`: For environment variable management
- `zod`: For data validation and type safety

3. Set up environment variables:
- Copy `.env.example` to `.env`
- Fill in the required API keys:
- `COMPOSIO_API_KEY`: Your Composio API key for tool access
- `OPENAI_API_KEY`: Your OpenAI API key for GPT-4 model access
- `GROQ_API_KEY` (Optional): Your Groq API key if using Groq models instead of OpenAI

```bash
# Copy the example environment file
cp .env.example .env

# Edit .env and add your API keys
nano .env
```

4. Run the demo:
```bash
node demo.mjs
```

## How it works

The demo:
1. Sets up a Composio toolset with Code Interpreter and Google Docs integration
2. Takes your professional information as input
3. Uses AI to generate ReactJS code for a portfolio website
4. Creates a detailed folder structure and setup instructions
5. Saves all generated content to a Google Doc

The agent will automatically process your information and generate a complete portfolio website setup.
24 changes: 20 additions & 4 deletions js/examples/scheduling-agent/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,26 @@ cd composio/js/examples/scheduling-agent
pnpm install
```

3. Create a `.env` file in this directory and add your Composio API key:
Required dependencies:
- `@ai-sdk/openai`: For OpenAI model integration
- `ai`: For text generation functionality
- `composio-core`: For Composio toolset and entity management
- `dotenv`: For environment variable management
Comment on lines 15 to +22

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation: The changes made to the README file improve clarity by listing the required dependencies directly. However, the instructions for creating a .env file and adding API keys have been removed, which might be necessary for users to successfully set up the project. Consider re-adding these instructions to ensure users have all the necessary setup information.

🔧 Suggested Code Diff:
 pnpm install ```
 
+3. Create a `.env` file in this directory and add your Composio API key:
+   ```
+   COMPOSIO_API_KEY=YOUR_COMPOSIO_API_KEY
+   OPENAI_API_KEY=YOUR_OPENAI_API_KEY
+   ```
 
 Required dependencies:
 - `@ai-sdk/openai`: For OpenAI model integration
 - `ai`: For text generation functionality
 - `composio-core`: For Composio toolset and entity management
 - `dotenv`: For environment variable management
📝 Committable Code Suggestion

‼️ Ensure you review the code suggestion before committing it to the branch. Make sure it replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
pnpm install
```
3. Create a `.env` file in this directory and add your Composio API key:
Required dependencies:
- `@ai-sdk/openai`: For OpenAI model integration
- `ai`: For text generation functionality
- `composio-core`: For Composio toolset and entity management
- `dotenv`: For environment variable management
pnpm install
3. Create a `.env` file in this directory and add your Composio API key:

COMPOSIO_API_KEY=YOUR_COMPOSIO_API_KEY
OPENAI_API_KEY=YOUR_OPENAI_API_KEY


Required dependencies:
- `@ai-sdk/openai`: For OpenAI model integration
- `ai`: For text generation functionality
- `composio-core`: For Composio toolset and entity management
- `dotenv`: For environment variable management

- `zod`: For data validation

3. Set up environment variables:
- Copy `.env.example` to `.env`
- Fill in the required API keys:
- `COMPOSIO_API_KEY`: Your Composio API key for tool access
- `OPENAI_API_KEY`: Your OpenAI API key for GPT-4 model access
- `GROQ_API_KEY` (Optional): Your Groq API key if using Groq models instead of OpenAI

```bash
COMPOSIO_API_KEY=YOUR_COMPOSIO_API_KEY
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
# Copy the example environment file
cp .env.example .env

# Edit .env and add your API keys
nano .env
```

4. Run the demo:
Expand All @@ -35,4 +51,4 @@ The demo sets up a trigger listener that:
3. Creates calendar events via Google Calendar
4. Sends confirmation emails via Gmail

The agent will automatically process incoming messages and handle the scheduling workflow.
The agent will automatically process incoming messages and handle the scheduling workflow.
Loading