semvec/pypi-packages huggingface dataset:
repo-chat 0.1.3
Using LLMS to facilitate document retrieval and chat operations
Requires Python: >=3.6

# Repo Chat

Repo Chat is a software package for answering queries about code repositories using large language models with document retrieval. It leverages the [langchain](https://github.com/OpenAI/langchain) library to facilitate the retrieval and chat operations.

## Installation

To install the required libraries, run:

```bash
pip install -r requirements.txt
```

## Usage

### Basic Usage

In order to use Repo Chat, you need to set the `OPENAI_API_KEY` in a .env file as shown below:

```
OPENAI_API_KEY=your_api_key_here
```

After setting the API key, you can use the `chain_manager` module to create a chain:

```python
from repo_chat import chain_manager

chain = chain_manager.get_chain("UPGRADE_QUERY")
```

You can then call the chain with input data:

```python
chain_input_data = {
    "query": "What does the function do?",
    "repo": "https://github.com/my-org/my-repo",
}

output = chain(chain_input_data)
```

### Advanced Usage

Please refer to the source code examples in the following files to learn more about Repo Chat's advanced features:

- `repo_chat\chain_manager.py`
- `repo_chat\chat_utils.py`
- `repo_chat\eval_utils.py`
- `repo_chat\templates.py`

## Chain Templates

Repo Chat uses multiple chain templates for different purposes. The templates are defined in `repo_chat\templates.py`. Here is a brief explanation of the available templates:

- `UPGRADE_QUERY`: Expand or refine a given query to improve the retrieved documents' quality and relevance.
- `RUN_QUERY_RAG`: Process the given query and its similar documents to provide the most accurate and relevant response possible.
- `CONTEXT_VALIDATOR`: Validate the context sufficiency of the given query and similar documents.
- `CRITIC`: Score a given response for a query by evaluating relevancy and accuracy.
- `RAW_CODE`: Process a given query for a specific code repository.

## Evaluation

Repo Chat provides evaluation utilities in the `repo_chat\eval_utils.py` module. The `CriticChain` class is used to evaluate a response generated by the model. The `QueryEvaluator` class is used to evaluate a single query against the Repo Chat chain, and `MultiQueryEvaluator` evaluates multiple queries in parallel.

## Contributing

Feel free to submit issues or pull requests if you have any suggestions or improvements you would like to add to Repo Chat.

## License

Repo Chat is released under the MIT License.
ventus 0.3.4
A google dorking library and cli.
Keywords: dorking,google,scraping,google dorking,hacking,cracking


<p align="center">
  <img src=".\media\banner.png" alt="banner">
</p>

<h3 align="center">A Google Dorking library & Command-Line Interface ðŸ‘¾</h3>

<p align="center">
  <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/aaronlyy/ventus">
  <img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/aaronlyy/ventus">
  <img alt="GitHub" src="https://img.shields.io/github/license/aaronlyy/ventus">
</p>

## Installation

Install ventus with pip

```pip install ventus```

## Usage (command-line interface)

```txt
Usage: ventus [OPTIONS] QUERY

Options:
  --help                Show this message and exit
  -p, --paste           Search paste sites
  -f, --files           Search filesharing sites
  -i, --index           Search index of /
  -d, --document        Search for DOCX files
```

## Usage (library)

### Example 1: Search a string

```py
from ventus import search

results = search("test")

for r in results:
    print(r)
```

### Example 2: Search a raw dork query

```py
from ventus import search

results = search("site:wikipedia.com mercedes")

for r in results:
    print(r)

for r in results:
    print(r)
```

### Example 3: Build and search a query using the query builder

```py
from ventus import search, Query

q = Query()
q.site("finance.yahoo.com")
q.intitle("AMD")

print(q) # site:finance.yahoo.com intitle:AMD

# search query
results = search(q)

for r in results:
    print(r)
```

### Example 4: Add a keyword group to a query

```py
from ventus import search, Query, Filter

q = Query()
q.site("finance.yahoo.com")
q.intitle(["BMW", "Mercedes"], group_seperator=Filter.AND)

print(q) # site:finance.yahoo.com intitle:(BMW & Mercedes)

# search query
results = search(q)

for r in results:
    print(r)
```

## Roadmap

- Move search wrapper directly into cli.py [DONE]
- Option to choose number of links to return
- Recode parts of the query builder
- More pre configured searches in CLI
- Option to use custom queries directly in the terminal

### About

Made with â™¥ by [aaronlyy](https://github.com/aaronlyy)