Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

The Developer's Guide to AI - From Prompts to Agents

Python Primer

Porting the Simple RAG example to Python.

Quick Start

The following steps will get you up and running on your machine.

  1. Install Ollama and run:
  • Download and install: https://ollama.com
  • Verify the install and start Llama in a terminal window:
~ % ollama run llama3.2
  1. Clone this project into a local directory:
~ % git clone <url>
  1. Install Python (if necessary)
~ % python -V
  • If the installation succeeded, the version will print
  1. Install Python modules
  • Navigate to the project part0/simple_rag_python directory in your terminal and run:
~/developers-guide-to-ai/part0/simple_rag_python % pip install -r requirements.txt
  • Navigate to the project part0/client directory in your terminal and run:
~/developers-guide-to-ai/part0/client % npm install
  1. Launch the server
  • In a terminal, navigate to the part0/simple_rag_python directory and run the following command:
~/developers-guide-to-ai/part0/getting_started_python % fastapi dev main.py
  1. Launch the client
  • In a separate terminal, navigate to the part0/client directory and run the following commands:
~/developers-guide-to-ai/part0/client % npm run dev
  1. Open your web browser and visit: http://localhost:5173

  2. Input a question and click Call your API to see the response streamed from Llama 3.2