Skip to content

Latest commit

 

History

History
85 lines (59 loc) · 2.33 KB

README.md

File metadata and controls

85 lines (59 loc) · 2.33 KB

TravelAgent

-> An API that develops travel itineraries with contextual and real time informations.

Technologies used:

- Docker
- AWS Cloud
- OpenAI GPT-3.5 Turbo
- OpenAI Embedding Models

The project:

fluxograma3

Libraries required:

bs4
chromadb
wikipedia
langchain
langchainhub
langchain-core
langchain-openai
duckduckgo-search
langchain-community
langchain-text-splitters 
*Available on "requirements.txt"

Tips:

Disclaimer: I developed this project on Windows 11.

1. Virtual Environment

I used a Virtual Environment to download all the libraries listed above.

a. Create a Virtual Environment:
  • python -m venv .venv
    
b. Change Command Prompt permissions:

This needs to be done before you activate the environment

  • Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
    
c. Activate the environment: - .venv/Scripts/activate

PS: after these instructions, you terminal should have a "(.venv)" before "PS C:\...\project_folder"

2. OpenAI Access Key

To work with the OpenAI API, we need to have an access key, which I stored in a ".env" file (The .env file isn't in this repository because it should be kept private). This way, we would need to run "source .env" before every time we wish to run our code.

To automate this, I used the "dotenv" library:
a. Install dotenv:
  • pip install python-dotenv
    
b. Import it in file:
  • from dotenv import load_dotenv
    
c. Add this function as the first code line:e

This is what automatizes "source .env"

  • load_dotenv()
    

This project was taught during NLW Dev, an event hosted by Rocketseat on july 2024, by Daniel Omar Soria Santos.