Skip to content

Given a website URL, we want to have a conversational interface to talk to URL content.

Notifications You must be signed in to change notification settings

pietro-tanure/talk_to_your_website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Talk to your website

Given a website URL, we want to have a conversational interface to talk to URL content.

Getting started

  1. Add API key to .env file

    echo 'GROQ_API_KEY="XXXX"' >> .env
    
  2. Create a virtual environment:

    virtualenv .venv
    source .venv/bin/activate
    
  3. Install requirements:

    make requirements
    
  4. Running the SDK:

  5. Running the API:

    python src/api.py
    

    Index the url

    curl -X POST "http://127.0.0.1:8001/index-url/" -H "Content-Type: application/json" -d '{"url": "https://en.wikipedia.org/wiki/Brazil"}'

    Make questions

    curl -X POST "http://127.0.0.1:8001/ask/" -H "Content-Type: application/json" -d '{"url": "https://en.wikipedia.org/wiki/Brazil", "question": "what is the population of Brazil?"}'
    
    curl -X POST "http://127.0.0.1:8001/ask/" -H "Content-Type: application/json" -d '{"url": "https://en.wikipedia.org/wiki/Brazil", "question": "what was my last question"}'
    

Project Organization

├── LICENSE            <- Open-source license if one is chosen
├── Makefile           <- Makefile with convenience commands like `make data` or `make train`
├── README.md          <- The top-level README for developers using this project.
│
├── notebooks          <- Jupyter notebooks. Naming convention is a number (for ordering),
│                         the creator's initials, and a short `-` delimited description, e.g.
│                         `1.0-jqp-initial-data-exploration`.
│
├── pyproject.toml     <- Project configuration file with package metadata for talk_to_your_website
│                         and configuration for tools like black
│
├── references         <- Coding exercise explanation
│
├── requirements.txt   <- The requirements file for reproducing the analysis environment, e.g.
│                         generated with `pip freeze > requirements.txt`
│
├── setup.cfg          <- Configuration file for flake8
│
└── src                <- Source code for use in this project.
    │
    ├── __init__.py    <- Makes src a Python module
    │
    ├── api.py         <- Scripts to generate endpoint API
    │
    └── url_chat.py    <- Scripts to create url augmented QA model

About

Given a website URL, we want to have a conversational interface to talk to URL content.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published