Skip to content

Aditya, an AI Assistant that uses Mixtral-8x7B as the Base LLM and other Tools to get Job Done

License

Notifications You must be signed in to change notification settings

NotoriousArnav/SimpleChatBot

Repository files navigation

Aditya: AI Assistant

Aditya is made using langchain that uses Mixtral-8x7B Model using Mistral AI.

How to run this?

  1. Clone the repo
git clone https://github.com/NotoriousArnav/SimpleChatBot/
  1. (Optional) Make a Virtual Environment for Isolation
    1. Make the Environment
      python -m venv env --prompt 'Aditya'
    2. Activate it
      • Windows
        • CMD
          env\Scripts\activate.bat
        • PowerShell
          env\Scripts\Activate.ps1
      • Linux/MacOS/Unix (for bash and zsh)
        source env/bin/activate
  2. Install Dependencies
    pip install -r requirements.txt
  3. Run it
    • WebUI (ChainLit)
      chainlit run chainlit.py
    • CLI
      python cli.py -h

LLM

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.

Special note for Freedom Guys and Testers

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

Tools

Currently, these are the Currently available tools.

  1. scrape_article
  2. Calculator
  3. Stable Diffusion with Lofi Girl Adapter Image Generation
  4. Stable Diffusion Image Generation
  5. Studio Ghilbli Art
  6. code_block
  7. remember
  8. starcoder2-15b
  9. starcoder2-3b
  10. Text Summarization
  11. 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
]
...

About

Aditya, an AI Assistant that uses Mixtral-8x7B as the Base LLM and other Tools to get Job Done

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published