https://github.com/VRSEN/langchain-agents-tutorial
https://github.com/VRSEN/langchain-agents-tutorial
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/VRSEN/langchain-agents-tutorial
- Owner: VRSEN
- Created: 2023-04-26T04:11:22.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-13T13:29:21.000Z (almost 2 years ago)
- Last Synced: 2024-11-26T04:32:10.356Z (5 months ago)
- Language: Python
- Size: 2.59 MB
- Stars: 37
- Watchers: 3
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - VRSEN/langchain-agents-tutorial - (Python)
README
# Virtual Assistant with Langchain
This is a basic guide on how to set up and run a virtual assistant project that connects to your calendar, email, and Twitter accounts using Langchain, Tweepy, and Zapier.
[](https://youtu.be/N4k459Zw2PU)
## Prerequisites
1. Python 3.6 or higher
2. `tweepy` library
3. `langchain` libraryTo install the required libraries, run:
```bash
pip install -r requirements.txt
```## Setting up API keys
You need to obtain API keys for the following services:
1. Twitter Developer Account (for Tweepy)
2. OpenAI API key
3. Zapier NLA API keyReplace the placeholders in the code with the respective API keys:
```python
consumer_key = ""
consumer_secret = ""
access_token = ""
access_token_secret = ""
``````python
set_api_key("<11LABS_API_KEY>")
openai.api_key = ""
``````python
zapier = ZapierNLAWrapper(zapier_nla_api_key="")
```## Running the program
1. Save the provided code in a file named `main.py`.
2. Open a terminal or command prompt and navigate to the folder containing `main.py`.
3. Run the program using the following command:```bash
python main.py
```4. The program will start an interactive session where you can type your messages to the virtual assistant. The assistant will respond to your queries based on the available tools and integrations.
## Example usage
You can interact with the virtual assistant using natural language, as it is capable of understanding and executing actions based on your input.
Examples:
- "Post a tweet saying 'Hello, World!'"
- "Schedule a meeting tomorrow at 3 PM"
- "Send an email to [email protected] with the subject 'Meeting reminder' and the message 'Don't forget our meeting tomorrow at 3 PM.'"To exit the program, press `Ctrl+C` or close the terminal window.