A proof-of-concept for running large language models (LLMs) locally using Langchain, Ollama and Docker.
- Docker
- Docker Compose
- Build and run the services with Docker Compose:
docker compose up --build
- Create a
.env
file in the root of the project based on.env.example
:cp .env.example .env
. - (Optional) You can change the chosen model in the .env file. Refer to Ollama's model library for available models.
- The service will be available at:
- As a SvelteKit frontend at
http://localhost:8080
- As LangChain's UI at
http://localhost:8000/chain/playground
- In the terminal, e.g.:
curl 'http://localhost:8000/chain/invoke' --data-raw '{"input":{"text":"hi"}}'
- As a SvelteKit frontend at
/chain/playground
: Provides an interactive UI to test the model./chain/invoke
: A REST API endpoint for programmatic interaction with the model.