Skip to content
PrithwishDas101Public

About

A local AI chatbot inspired by K-2SO from Star Wars, powered by Ollama and Python. Run language models locally and interact with an AI assistant from your terminal.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

K-2SO

A local command-line AI chatbot inspired by K-2SO from Star Wars. It uses Ollama to run a local language model and aims for a dry, sarcastic, witty personality while retaining conversational context.

Features

  • Local inference through Ollama; no hosted AI API key is required for the local workflow
  • Conversational memory during a session
  • K-2SO-inspired sarcastic and dry responses
  • Command-line interface
  • Help and clear-memory commands

Requirements

  • Python 3
  • Ollama installed and running
  • A model available in Ollama (the examples below use llama3)

Setup

Clone the actual repository and install the Python dependencies:

git clone https://github.com/PrithwishDas101/K-2SO.git
cd K-2SO
pip install -r requirements.txt

In one terminal, start the model:

ollama run llama3

Keep Ollama running. In another terminal, start the chatbot:

python main.py

If the code is configured for a different Ollama model, pull that model and use its exact name instead.

Commands

  • /help — show available commands
  • /clear — clear conversation memory
  • exit — leave the chatbot

Example

You: hi
K-2SO: Finally, someone to talk to. I was starting to think it was just me and those dull droids out here.

How it works

The Python application sends prompts to the local Ollama service and prints the generated response in the terminal. The model runs on your machine, so response speed and memory usage depend on your hardware and the model you choose.

Troubleshooting

  • Make sure Ollama is installed and its service is running before launching the script.
  • Confirm the selected model has been downloaded with ollama list.
  • If the chatbot cannot connect, check that Ollama is reachable at its configured local address.
  • Install dependencies from requirements.txt in the same Python environment used to run main.py.

A personal local-AI project by Prithwish Das.

About

A local AI chatbot inspired by K-2SO from Star Wars, powered by Ollama and Python. Run language models locally and interact with an AI assistant from your terminal.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages