Coder Social home page Coder Social logo

morpheuslord / hackbot Goto Github PK

View Code? Open in Web Editor NEW
215.0 7.0 34.0 45 KB

AI-powered cybersecurity chatbot designed to provide helpful and accurate answers to your cybersecurity-related queries and also do code analysis and scan analysis.

Python 100.00%
ai chatbot cli-chat-app llama2 automation cybersecurity cybersecurity-education cybersecurity-tools llama2-7b llamacpp

hackbot's People

Contributors

morpheuslord avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hackbot's Issues

error while installing requirements.txt

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 2
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Model location, dataset, training.

1.Hello,llama.bin should stored in same folder with hackbot.py but cant find it anywhere... where it can be? ) But it work. Thanks a lot for your work.

  1. Can it work with other datasets, models (maybe there is some unrestricted models? even with some prompts there is still a lot of filters/censorship . Can you maybe advise some model with RLHF, without restrictions with same lvl . https://huggingface.co/TheBloke/Luna-AI-Llama2-Uncensored-GGML

  2. Can user create own dataset to train on? for example there is a some folder with a lot of scripts , files , etc . can ai analyze code with readme files and get in memory/db . Can locall lama have database and memory of context of dialog . Btw there is a lot of vuln db , cve dbs, exploit dbs.
    Your trainedmodel, datasets on hfaces, how can be used ?
    Or provide a url list/ api endpoints with some json content, or streasm to ai to feed up db/memory of dataset/db

  3. There is llama codemodels
    are there better in code writing vs chat models? What if use Hackbot in 2 modes with different models using. unrestricted code models?

  4. UI with code snippets/webui https://github.com/oobabooga/text-generation-webui https://github.com/liltom-eth/llama2-webui + dialog, context memory can be a helpful .

i am new in ai , and its my first llm running locally(shure localy*?))) )

mac os run hackbot ???

chikkachun@chikdeMBP ~ % git clone https://github.com/morpheuslord/hackbot.git
cd hackbot
Cloning into 'hackbot'...
remote: Enumerating objects: 71, done.
remote: Counting objects: 100% (71/71), done.
remote: Compressing objects: 100% (66/66), done.
remote: Total 71 (delta 18), reused 22 (delta 4), pack-reused 0
Unpacking objects: 100% (71/71), done.
chikkachun@chikdeMBP hackbot % pip install -r requirements.txt
Collecting langchain==0.0.237 (from -r requirements.txt (line 1))
Obtaining dependency information for langchain==0.0.237 from https://files.pythonhosted.org/packages/89/b1/73ba21a11f8ddba3d0f867f02412ee97e598fac29365a60a3a46556ac2a0/langchain-0.0.237-py3-none-any.whl.metadata
Downloading langchain-0.0.237-py3-none-any.whl.metadata (14 kB)
Collecting langchainplus-sdk==0.0.20 (from -r requirements.txt (line 2))
Obtaining dependency information for langchainplus-sdk==0.0.20 from https://files.pythonhosted.org/packages/ef/93/22f2d584ffa0281d51fcd8500f7c807879610ac97851f7d8eb0458165373/langchainplus_sdk-0.0.20-py3-none-any.whl.metadata
Downloading langchainplus_sdk-0.0.20-py3-none-any.whl.metadata (8.7 kB)
Collecting rich==13.4.2 (from -r requirements.txt (line 3))
Obtaining dependency information for rich==13.4.2 from https://files.pythonhosted.org/packages/fc/1e/482e5eec0b89b593e81d78f819a9412849814e22225842b598908e7ac560/rich-13.4.2-py3-none-any.whl.metadata
Downloading rich-13.4.2-py3-none-any.whl.metadata (18 kB)
Collecting Markdown==3.4.3 (from -r requirements.txt (line 4))
Downloading Markdown-3.4.3-py3-none-any.whl (93 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 93.9/93.9 kB 2.6 MB/s eta 0:00:00
Collecting markdown-it-py==2.2.0 (from -r requirements.txt (line 5))
Downloading markdown_it_py-2.2.0-py3-none-any.whl (84 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 84.5/84.5 kB 3.3 MB/s eta 0:00:00
Collecting llama-cpp-python==0.1.77 (from -r requirements.txt (line 6))
Downloading llama_cpp_python-0.1.77.tar.gz (1.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 20.0 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting PyYAML>=5.4.1 (from langchain==0.0.237->-r requirements.txt (line 1))
Obtaining dependency information for PyYAML>=5.4.1 from https://files.pythonhosted.org/packages/ec/0d/26fb23e8863e0aeaac0c64e03fd27367ad2ae3f3cccf3798ee98ce160368/PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl.metadata
Downloading PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl.metadata (2.1 kB)
Requirement already satisfied: SQLAlchemy<3,>=1.4 in /usr/local/lib/python3.11/site-packages (from langchain==0.0.237->-r requirements.txt (line 1)) (2.0.19)
Collecting aiohttp<4.0.0,>=3.8.3 (from langchain==0.0.237->-r requirements.txt (line 1))
Obtaining dependency information for aiohttp<4.0.0,>=3.8.3 from https://files.pythonhosted.org/packages/64/04/9ef622ccb6b340b3b53812e19f1658311614889452258eff91f6c9e1a1d9/aiohttp-3.8.5-cp311-cp311-macosx_10_9_x86_64.whl.metadata
Downloading aiohttp-3.8.5-cp311-cp311-macosx_10_9_x86_64.whl.metadata (7.7 kB)
Collecting dataclasses-json<0.6.0,>=0.5.7 (from langchain==0.0.237->-r requirements.txt (line 1))
Obtaining dependency information for dataclasses-json<0.6.0,>=0.5.7 from https://files.pythonhosted.org/packages/97/5f/e7cc90f36152810cab08b6c9c1125e8bcb9d76f8b3018d101b5f877b386c/dataclasses_json-0.5.14-py3-none-any.whl.metadata
Downloading dataclasses_json-0.5.14-py3-none-any.whl.metadata (22 kB)
Collecting langsmith<0.0.11,>=0.0.10 (from langchain==0.0.237->-r requirements.txt (line 1))
Obtaining dependency information for langsmith<0.0.11,>=0.0.10 from https://files.pythonhosted.org/packages/a9/ed/9813d7c199e705865902fdc1e2076b588d6f93ffac93d37f4b50a5205a1b/langsmith-0.0.10-py3-none-any.whl.metadata
Downloading langsmith-0.0.10-py3-none-any.whl.metadata (8.7 kB)
Collecting numexpr<3.0.0,>=2.8.4 (from langchain==0.0.237->-r requirements.txt (line 1))
Obtaining dependency information for numexpr<3.0.0,>=2.8.4 from https://files.pythonhosted.org/packages/cd/7e/e96c5d882dcdb63a65188cfd23b2b89f2606a859db1fe4a16169af0b13bf/numexpr-2.8.5-cp311-cp311-macosx_10_9_x86_64.whl.metadata
Downloading numexpr-2.8.5-cp311-cp311-macosx_10_9_x86_64.whl.metadata (8.0 kB)
Requirement already satisfied: numpy<2,>=1 in /usr/local/lib/python3.11/site-packages (from langchain==0.0.237->-r requirements.txt (line 1)) (1.25.1)
Collecting openapi-schema-pydantic<2.0,>=1.2 (from langchain==0.0.237->-r requirements.txt (line 1))
Downloading openapi_schema_pydantic-1.2.4-py3-none-any.whl (90 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.0/90.0 kB 13.9 MB/s eta 0:00:00
Collecting pydantic<2,>=1 (from langchain==0.0.237->-r requirements.txt (line 1))
Obtaining dependency information for pydantic<2,>=1 from https://files.pythonhosted.org/packages/15/ef/24f51eee3ccb81d42aeee387d4cf43a5d0e8ddafad967bce7754d44b755d/pydantic-1.10.12-cp311-cp311-macosx_10_9_x86_64.whl.metadata
Downloading pydantic-1.10.12-cp311-cp311-macosx_10_9_x86_64.whl.metadata (149 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 149.3/149.3 kB 5.9 MB/s eta 0:00:00
Requirement already satisfied: requests<3,>=2 in /usr/local/lib/python3.11/site-packages (from langchain==0.0.237->-r requirements.txt (line 1)) (2.23.0)
Collecting tenacity<9.0.0,>=8.1.0 (from langchain==0.0.237->-r requirements.txt (line 1))
Obtaining dependency information for tenacity<9.0.0,>=8.1.0 from https://files.pythonhosted.org/packages/f4/f1/990741d5bb2487d529d20a433210ffa136a367751e454214013b441c4575/tenacity-8.2.3-py3-none-any.whl.metadata
Downloading tenacity-8.2.3-py3-none-any.whl.metadata (1.0 kB)
Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.11/site-packages (from rich==13.4.2->-r requirements.txt (line 3)) (2.15.1)
Collecting mdurl~=0.1 (from markdown-it-py==2.2.0->-r requirements.txt (line 5))
Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Requirement already satisfied: typing-extensions>=4.5.0 in /usr/local/lib/python3.11/site-packages (from llama-cpp-python==0.1.77->-r requirements.txt (line 6)) (4.7.1)
Collecting diskcache>=5.6.1 (from llama-cpp-python==0.1.77->-r requirements.txt (line 6))
Downloading diskcache-5.6.1-py3-none-any.whl (45 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 45.6/45.6 kB 1.6 MB/s eta 0:00:00
Collecting attrs>=17.3.0 (from aiohttp<4.0.0,>=3.8.3->langchain==0.0.237->-r requirements.txt (line 1))
Downloading attrs-23.1.0-py3-none-any.whl (61 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.2/61.2 kB 2.3 MB/s eta 0:00:00
Collecting charset-normalizer<4.0,>=2.0 (from aiohttp<4.0.0,>=3.8.3->langchain==0.0.237->-r requirements.txt (line 1))
Obtaining dependency information for charset-normalizer<4.0,>=2.0 from https://files.pythonhosted.org/packages/0f/16/8d50877a7215d31f024245a0acbda9e484dd70a21794f3109a6d8eaeba99/charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_x86_64.whl.metadata
Downloading charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_x86_64.whl.metadata (31 kB)
Collecting multidict<7.0,>=4.5 (from aiohttp<4.0.0,>=3.8.3->langchain==0.0.237->-r requirements.txt (line 1))
Downloading multidict-6.0.4-cp311-cp311-macosx_10_9_x86_64.whl (29 kB)
Collecting async-timeout<5.0,>=4.0.0a3 (from aiohttp<4.0.0,>=3.8.3->langchain==0.0.237->-r requirements.txt (line 1))
Obtaining dependency information for async-timeout<5.0,>=4.0.0a3 from https://files.pythonhosted.org/packages/a7/fa/e01228c2938de91d47b307831c62ab9e4001e747789d0b05baf779a6488c/async_timeout-4.0.3-py3-none-any.whl.metadata
Downloading async_timeout-4.0.3-py3-none-any.whl.metadata (4.2 kB)
Collecting yarl<2.0,>=1.0 (from aiohttp<4.0.0,>=3.8.3->langchain==0.0.237->-r requirements.txt (line 1))
Downloading yarl-1.9.2-cp311-cp311-macosx_10_9_x86_64.whl (64 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.4/64.4 kB 2.2 MB/s eta 0:00:00
Collecting frozenlist>=1.1.1 (from aiohttp<4.0.0,>=3.8.3->langchain==0.0.237->-r requirements.txt (line 1))
Obtaining dependency information for frozenlist>=1.1.1 from https://files.pythonhosted.org/packages/1d/29/1a30aedecf5b6542f1dba92383352ccb35a3affcdf94bc5b2917dc95ce3b/frozenlist-1.4.0-cp311-cp311-macosx_10_9_x86_64.whl.metadata
Downloading frozenlist-1.4.0-cp311-cp311-macosx_10_9_x86_64.whl.metadata (5.2 kB)
Collecting aiosignal>=1.1.2 (from aiohttp<4.0.0,>=3.8.3->langchain==0.0.237->-r requirements.txt (line 1))
Downloading aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
Collecting marshmallow<4.0.0,>=3.18.0 (from dataclasses-json<0.6.0,>=0.5.7->langchain==0.0.237->-r requirements.txt (line 1))
Obtaining dependency information for marshmallow<4.0.0,>=3.18.0 from https://files.pythonhosted.org/packages/ed/3c/cebfdcad015240014ff08b883d1c0c427f2ba45ae8c6572851b6ef136cad/marshmallow-3.20.1-py3-none-any.whl.metadata
Downloading marshmallow-3.20.1-py3-none-any.whl.metadata (7.8 kB)
Collecting typing-inspect<1,>=0.4.0 (from dataclasses-json<0.6.0,>=0.5.7->langchain==0.0.237->-r requirements.txt (line 1))
Obtaining dependency information for typing-inspect<1,>=0.4.0 from https://files.pythonhosted.org/packages/65/f3/107a22063bf27bdccf2024833d3445f4eea42b2e598abfbd46f6a63b6cb0/typing_inspect-0.9.0-py3-none-any.whl.metadata
Downloading typing_inspect-0.9.0-py3-none-any.whl.metadata (1.5 kB)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.11/site-packages (from requests<3,>=2->langchain==0.0.237->-r requirements.txt (line 1)) (3.0.4)
Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.11/site-packages (from requests<3,>=2->langchain==0.0.237->-r requirements.txt (line 1)) (2.10)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.11/site-packages (from requests<3,>=2->langchain==0.0.237->-r requirements.txt (line 1)) (1.25.11)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.11/site-packages (from requests<3,>=2->langchain==0.0.237->-r requirements.txt (line 1)) (2023.7.22)
Requirement already satisfied: greenlet!=0.4.17 in /usr/local/lib/python3.11/site-packages (from SQLAlchemy<3,>=1.4->langchain==0.0.237->-r requirements.txt (line 1)) (2.0.2)
Collecting packaging>=17.0 (from marshmallow<4.0.0,>=3.18.0->dataclasses-json<0.6.0,>=0.5.7->langchain==0.0.237->-r requirements.txt (line 1))
Using cached packaging-23.1-py3-none-any.whl (48 kB)
Collecting mypy-extensions>=0.3.0 (from typing-inspect<1,>=0.4.0->dataclasses-json<0.6.0,>=0.5.7->langchain==0.0.237->-r requirements.txt (line 1))
Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)
Downloading langchain-0.0.237-py3-none-any.whl (1.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 26.2 MB/s eta 0:00:00
Downloading langchainplus_sdk-0.0.20-py3-none-any.whl (25 kB)
Downloading rich-13.4.2-py3-none-any.whl (239 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 239.4/239.4 kB 9.0 MB/s eta 0:00:00
Downloading aiohttp-3.8.5-cp311-cp311-macosx_10_9_x86_64.whl (362 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 362.6/362.6 kB 13.0 MB/s eta 0:00:00
Downloading dataclasses_json-0.5.14-py3-none-any.whl (26 kB)
Downloading langsmith-0.0.10-py3-none-any.whl (27 kB)
Downloading numexpr-2.8.5-cp311-cp311-macosx_10_9_x86_64.whl (101 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 101.8/101.8 kB 4.3 MB/s eta 0:00:00
Downloading pydantic-1.10.12-cp311-cp311-macosx_10_9_x86_64.whl (2.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.8/2.8 MB 33.0 MB/s eta 0:00:00
Downloading PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl (187 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 187.9/187.9 kB 7.6 MB/s eta 0:00:00
Downloading tenacity-8.2.3-py3-none-any.whl (24 kB)
Downloading async_timeout-4.0.3-py3-none-any.whl (5.7 kB)
Downloading charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_x86_64.whl (125 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 125.1/125.1 kB 4.8 MB/s eta 0:00:00
Downloading frozenlist-1.4.0-cp311-cp311-macosx_10_9_x86_64.whl (47 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 47.7/47.7 kB 1.8 MB/s eta 0:00:00
Downloading marshmallow-3.20.1-py3-none-any.whl (49 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.4/49.4 kB 1.7 MB/s eta 0:00:00
Downloading typing_inspect-0.9.0-py3-none-any.whl (8.8 kB)
Building wheels for collected packages: llama-cpp-python
Building wheel for llama-cpp-python (pyproject.toml) ... done
Created wheel for llama-cpp-python: filename=llama_cpp_python-0.1.77-cp311-cp311-macosx_13_0_x86_64.whl size=292101 sha256=eaa82fbcce6b8f049f845b2c082eeb9d5f3165603b3fbde8c1d4f6932c32b93c
Stored in directory: /Users/chikkachun/Library/Caches/pip/wheels/e2/67/cb/481cfaabbb5fd5edab627c5b475de63e1b6f7d4d7b678d4d25
Successfully built llama-cpp-python
Installing collected packages: tenacity, PyYAML, pydantic, packaging, numexpr, mypy-extensions, multidict, mdurl, Markdown, frozenlist, diskcache, charset-normalizer, attrs, async-timeout, yarl, typing-inspect, openapi-schema-pydantic, marshmallow, markdown-it-py, llama-cpp-python, langsmith, langchainplus-sdk, aiosignal, rich, dataclasses-json, aiohttp, langchain
Attempting uninstall: PyYAML
Found existing installation: PyYAML 5.3.1
Uninstalling PyYAML-5.3.1:
ERROR: Could not install packages due to an OSError: Cannot move the non-empty directory '/usr/local/lib/python3.11/site-packages/PyYAML-5.3.1.dist-info/': Lacking write permission to '/usr/local/lib/python3.11/site-packages/PyYAML-5.3.1.dist-info/'.

chikkachun@chikdeMBP hackbot % python hackbot.py
zsh: command not found: python
chikkachun@chikdeMBP hackbot % ls
README.md hackbot.py requirements.txt
chikkachun@chikdeMBP hackbot % python hackbot.py
zsh: command not found: python
chikkachun@chikdeMBP hackbot % python3 hackbot.py
Traceback (most recent call last):
File "/Users/chikkachun/hackbot/hackbot.py", line 5, in
from langchain.llms import LlamaCpp
ModuleNotFoundError: No module named 'langchain'
chikkachun@chikdeMBP hackbot %

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.