Aditya is made using langchain that uses Mixtral-8x7B Model using Mistral AI.
- Clone the repo
git clone https://github.com/NotoriousArnav/SimpleChatBot/
- (Optional) Make a Virtual Environment for Isolation
- Make the Environment
python -m venv env --prompt 'Aditya'
- Activate it
- Windows
- CMD
env\Scripts\activate.bat
- PowerShell
env\Scripts\Activate.ps1
- CMD
- Linux/MacOS/Unix (for bash and zsh)
source env/bin/activate
- Windows
- Make the Environment
- Install Dependencies
pip install -r requirements.txt
- Run it
- WebUI (ChainLit)
chainlit run chainlit.py
- CLI
python cli.py -h
- WebUI (ChainLit)
The llm.py
module purose is to make an Langchain LLM Object. Some people may prefer GPT Series of LLMs by OpenAI, or Llama or Anything Custom too. An LLM Can be Defined here, tested and can be Imported by any other module, for example agent.py
.
Some may even prefer Running the LLM locally or on a Private Server using Ollama, so you can totally do so, but since during development I did not have a Powerful Laptop, I did not try it, but its Reccomended, so that you can try CustomLLMs
Currently, these are the Currently available tools.
- scrape_article
- Calculator
- Stable Diffusion with Lofi Girl Adapter Image Generation
- Stable Diffusion Image Generation
- Studio Ghilbli Art
- code_block
- remember
- starcoder2-15b
- starcoder2-3b
- Text Summarization
- Wolfram Alpha Advance Calculator (Incomplete)
Tool Creation can be done using langchain's BaseTool Class.
# tools/sometool.py
from langchain_communit.tools import BaseTool
class SomeTool(BaseTool): #<- Declare it Like this
name = "Tool name"
description = "Tool Description and Use Case"
def _run(self, input: str) -> str:
# Do Something
return
#tools/__init__.py
from .sometool import SomeTool #<- Import it
...
tools = [
...
SomeTool() #<- Add that to tools list
]
...