feat: package manager
This commit is contained in:
parent
fbcf0168f9
commit
0730db5727
14
.editorconfig
Normal file
14
.editorconfig
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
max_line_length = 120
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
max_line_length = 0
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
/transcripts
|
/transcripts
|
||||||
/index
|
/index
|
||||||
/.idea
|
/.idea
|
||||||
|
/venv
|
||||||
|
@ -9,9 +9,15 @@ Well, let's ask our LLM:
|
|||||||
|
|
||||||
## How to run
|
## How to run
|
||||||
### Install dependencies
|
### Install dependencies
|
||||||
I have no idea what the correct way to install dependencies with python is. Somehow install these libraries and their dependencies:
|
It is recommended to use a python version greater than or equal to ``3.10.0``.
|
||||||
- llama_index
|
Another stuff recommended, is to create a venv or use an IDE that supports venv creation, so all dependencies are installed locally to the project and not globally. If not, you can use https://virtualenv.pypa.io/en/latest/ to artificially create isolated environments.
|
||||||
- beautifulsoup4
|
|
||||||
|
Install the dependencies required to run the project by running the following command at the project root :
|
||||||
|
|
||||||
|
```shell
|
||||||
|
pip install -r requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
### Execution
|
### Execution
|
||||||
Download transcripts:
|
Download transcripts:
|
||||||
```shell
|
```shell
|
||||||
@ -31,6 +37,7 @@ python3 main.py
|
|||||||
On the first run, it will generate the index. This can take a while, but it will be cached on disk for the next runs.
|
On the first run, it will generate the index. This can take a while, but it will be cached on disk for the next runs.
|
||||||
|
|
||||||
You can then ask it any questions about Darknet Diaries!
|
You can then ask it any questions about Darknet Diaries!
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
> What is the intro of the podcast?
|
> What is the intro of the podcast?
|
||||||
@ -69,4 +76,4 @@ You can then ask it any questions about Darknet Diaries!
|
|||||||
>>The episode also covers a project where Jason was tasked with hacking into a large, worldwide bank. His job was to examine the bank's mobile app for any potential security vulnerabilities that could expose customer or sensitive information. The episode provides a detailed look into the world of penetration testing, highlighting the importance of robust security measures in both physical and digital spaces.
|
>>The episode also covers a project where Jason was tasked with hacking into a large, worldwide bank. His job was to examine the bank's mobile app for any potential security vulnerabilities that could expose customer or sensitive information. The episode provides a detailed look into the world of penetration testing, highlighting the importance of robust security measures in both physical and digital spaces.
|
||||||
>
|
>
|
||||||
> How many downloads does this episode have?
|
> How many downloads does this episode have?
|
||||||
>> Episode 130 of Darknet Diaries, titled "JASON'S PEN TEST", has 667,528 downloads.
|
>> Episode 130 of Darknet Diaries, titled "JASON'S PEN TEST", has 667,528 downloads.
|
3
main.py
3
main.py
@ -4,7 +4,7 @@ from llama_index.node_parser import SimpleNodeParser
|
|||||||
from llama_index import VectorStoreIndex
|
from llama_index import VectorStoreIndex
|
||||||
from llama_index.llms import OpenAI, ChatMessage, MessageRole
|
from llama_index.llms import OpenAI, ChatMessage, MessageRole
|
||||||
from llama_index.prompts import ChatPromptTemplate
|
from llama_index.prompts import ChatPromptTemplate
|
||||||
from llama_index import set_global_handler
|
# from llama_index import set_global_handler
|
||||||
from llama_index.chat_engine.types import ChatMode
|
from llama_index.chat_engine.types import ChatMode
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
@ -103,4 +103,3 @@ while True:
|
|||||||
chat_engine.chat_repl()
|
chat_engine.chat_repl()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
9
requirements.txt
Normal file
9
requirements.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# =====================
|
||||||
|
# Required dependencies
|
||||||
|
# =====================
|
||||||
|
llama-index==0.8.*
|
||||||
|
beautifulsoup4==4.12.*
|
||||||
|
|
||||||
|
# =====================
|
||||||
|
# Development dependencies
|
||||||
|
# =====================
|
Loading…
Reference in New Issue
Block a user