This README provides a step-by-step guide to set up the project in the Sales_Agent directory. Follow the instructions carefully to create a virtual environment, install dependencies, and configure necessary API keys.
-
Ensure that Python is installed on your system. You can check this by running:
python --version
-
Install pip if it's not already installed:
python -m ensurepip --upgrade
-
Navigate to the Sales_Agent directory:
cd path/to/Sales_Agent -
Create a virtual environment:
python -m venv venv
This command creates a new directory named
venvwithin theSales_Agentfolder, containing a self-contained Python environment. -
Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
- On Windows:
Once the virtual environment is activated, install the required dependencies using the following command:
pip install -r requirements.txt-
Create a
.envfile in theSales_Agentdirectory:touch .env
-
Open the
.envfile and add the following lines, replacing placeholders with your actual API keys and Gmail app password:GROQ_API_KEY=your_groq_api_key_here PERPLEXITY_API_KEY=your_perplexity_api_key_here password="your_gmail_app_password_here"
To create an app password for your Gmail account:
- Go to your Google Account settings.
- Navigate to Security.
- Under "Signing in to Google," select App passwords.
- Follow the prompts to generate an app password.
- Copy this password and paste it into your
.envfile underpassword.
-
Enable Google Sheets API:
- Go to the Google Cloud Console.
- Create a new project or select an existing one.
- Navigate to APIs & Services > Library.
- In the search bar, type "Google Sheets API" and select it from the results.
- Click on Enable to enable the Google Sheets API for your project [1][2].
-
Create OAuth Credentials:
- Still in the Google Cloud Console, go to APIs & Services > Credentials.
- Click on Create Credentials, then select OAuth client ID.
- Configure the consent screen if prompted, providing necessary details like Application Name (e.g.,
SpreadsheetConnector). - Choose application type as Desktop app, then click Create.
- Download the credentials JSON file and rename it to
credentials.json.
-
Place
credentials.jsonin theSales_Agentdirectory.
- Open
app.py. - Locate the
sender_detailsdictionary (on line 122). - Change the
sender_emailvalue to your own Gmail address.
With everything set up, you can now run your application:
streamlit run app.pyThe app will launch on your localhost.
- If you choose to switch to another LLM, ensure you provide the corresponding API key in the
.envfile.
By following these steps, you should have a fully functional setup for your Sales_Agent project!