An LLM in python that chats like a pirate using a GROQ API key and calls tools (calculate, ls, cat, grep).
Project description
LLM Project
This project is an LLM chatbot that writes simple output with pirate language. It can also call tools, such as calculate, cat, ls, and grep.
Here's the link to my PyPI project.
Installation and Usage:
This example code shows how to install the package, uses the /ls command to list the files in the tools folder, and demonstrates how the chatbot works in multiple rounds.
$ pip install -i https://test.pypi.org/simple/ cmc-csci40-MeganTu
$ chat
chat> /ls tools/
tools/__init__.py tools/__pycache__ tools/calculate.py tools/cat.py tools/doctest.py tools/grep.py tools/ls.py tools/rm.py tools/util.py tools/write_file.py tools/write_files.py
chat> My name is Bob
Ahoy, Bob! Ye be sailin’ these digital seas with a fine name. May the wind be ever at yer back, matey!
chat> I'm 23 years old.
Aye, a spry 23 summers on the deck, Bob! May yer voyages be full o’ treasure and good rum!
chat> What's my name?
Yer name be Bob, matey!
chat> How old am I?
Ye be 23 years o’ age, matey!
More Examples
This example lists the pages in my webpage project.
$ cd megan-tu.github.io
$ chat
chat> /ls test_projects/megan-tu.github.io
test_projects/megan-tu.github.io/Carmel.html test_projects/megan-tu.github.io/Philippines.html test_projects/megan-tu.github.io/README.md test_projects/megan-tu.github.io/Taiwan.html test_projects/megan-tu.github.io/index.html test_projects/megan-tu.github.io/style.css
This example explains how my markdown project does not use regex to write markdown format, but is based on string operations.
$ cd test_projects/markdown-project
$ chat
chat> does my markdown project use regex to write markdown?
Arr, after scourin’ the code ye be sailin’ through, I find naught but plain‑ol’ string finds, replaces and slices. There be no `re` module nor regex patterns employed—ye markdown compiler relies on simple string operations, not regex. ☠️
This example explains what my webscraping project does and what it outputs.
$ cd test_projects/project-webscraping
$ chat
chat> How does my webscraping project work?
In short, the script masquerades as a real browser, scrolls through eBay result pages, parses each product card with BeautifulSoup, extracts the key fields, and writes ’em out as JSON or CSV. That’s how yer web‑scrapin’ project grabs the loot! 🏴☠️
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cmc_csci40_megantu-1.0.8.tar.gz.
File metadata
- Download URL: cmc_csci40_megantu-1.0.8.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
434db1aa0392e469dfa42f43d38a10d03030a959f4b93a92c0b0e87dbaee43f7
|
|
| MD5 |
c41d91fbd67a5c68713232f12cf4e21d
|
|
| BLAKE2b-256 |
341ae56466908ea9137c4d49a15d774ca46b51886c6350811db988193c054d4c
|
File details
Details for the file cmc_csci40_megantu-1.0.8-py3-none-any.whl.
File metadata
- Download URL: cmc_csci40_megantu-1.0.8-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e7cc55d0e617b0b12765ef3955e5106076a3eb62428931e7b10f73d5a14a6aa
|
|
| MD5 |
cdef1c9b2cf330b2357558788b58170c
|
|
| BLAKE2b-256 |
2bf340bc3fe4ca7ab797407d313dfed1b0a208f7dd9cea8c2e7be9eaade6618a
|