module
Version:
v0.0.0-...-389fe15
Opens a new window with list of versions in this module.
Published: Nov 17, 2024
License: GPL-3.0
Opens a new window with license information.
README
¶
portfolio-api

portfolio-api
is a retrieval augmented generation API to allow users to ask questions about the content in a developer portfolio.
Intended to be integrated into a portfolio website.
how it works
- Opens
experience.json
and projects.json
files to retrieve experiences and projects.
- Generates vector embeddings for each experience and project, stores them in a SQLite database.
- Duplicates are ignored by checking the content hash
- User sends
POST /api/v1/ask
request with a question
- Calculates cosine similarity between the question and each embedding in the database
- This is currently being done in the application layer, but should be done in the database layer if the db has a large amount of embeddings
- Top 3 most similar documents are used to generate a prompt for the LLM
installation
prerequisites
local development
- Clone the repository
- Initialize .env file with the respective variables
- Run
source <(make exportenv)
- Run
make run/docker
Directories
¶
cmd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.