semvec/pypi-packages huggingface dataset:
docusearch 0.5.0
Query documents quickly and efficiently
Requires Python: >=3.6

# Docusearch

Welcome to **Docusearch**, the ultimate tool for document searching and processing using the power of vector embeddings. Follow the steps below to get started quickly!

## Installation

First, you need to install the `docusearch` package using `pip`. Installation may take a minute or two. To avoid conflicts, it is recommend you use a virtual environment:

```sh
pip install docusearch
```

## Usage

### Step 1: Import the Module
After installing the package, import the `process_query` function from the `docusearch` module:

```sh
from docusearch import process_query
```

### Step 2: Set the Parameters
Define the parameters for your query. You need to set your OpenAI API key, the path to the folder containing the documents, and the query for those documents

```sh
query = "What are some cool features of the Audi r8"
api_key = "your-openai-key"
folder_path = "path-to-your-folder"
```

### Step 3: Call the Function and Print the Result
Now, call the `process_query` function with the parameters you set and print the result:

```sh
result = process_query(query, api_key, folder_path)
print(result)
```

## Example

Here is the complete example code:

```sh
from docusearch import process_query

query = "What are some cool features of the Audi r8"
api_key = "your-openai-key"
folder_path = "path-to-your-folder"

result = process_query(query, api_key, folder_path)
print(result)
```

And that's it! You have successfully used the docusearch package to process your query. Enjoy searching your documents with ease!

## Additional Info

If you would like specific information about the result, you can use the `extract_info` function. It will provide you the document source, answer, citations, and warnings for unsupported files.

### Import the extract_info Function
```sh
from docusearch import extract_info
```

### Use the extract_info function to extract the document source, answer, citations, and any warnings:

```sh
document_source, answer, citations, warning = extract_info(result)

print(f"Document Source: {document_source}")
print(f"Answer: {answer}")
print(f"Citations: {citations}")
if warning:
    print(f"Warning: {warning}")
```

### Complete Example
Here is the complete example code to query and extract specific information:

```sh
from docusearch import process_query, extract_info

query = "What are some cool features of the Audi r8"
api_key = "your-openai-key"
folder_path = "path-to-your-folder"

# Process the query
result = process_query(query, api_key, folder_path)

# Extract information from the result
document_source, answer, citations, warning = extract_info(result)

# Print the extracted information
print(f"Document Source: {document_source}")
print(f"Answer: {answer}")
print(f"Citations: {citations}")
if warning:
    print(f"Warning: {warning}")
```

By following these steps, you can easily extract and use specific pieces of information from the result provided by the `docusearch` package. Have fun!
lyntrpy 1.0.0
A api wrapper for lyntr`s api in python
Requires Python: >=3.8

# lyntrpy
 A api wrapper for lyntr`s api in python

# How to make the .env file
In order to create a `.env` file you need 3 cookies:
- `_TOKEN_DO_NOT_SHARE`
- `temp-discord-token`
- `cf_clearance`

The `_TOKEN_DO_NOT_SHARE` cookie is required to authenticate with the lyntr api.

The `temp-discord-token` cookie is only needed when creating an account (to my knowledge) so it can probaly left empty but i would stil set it.

The `cf_clearance` is used to authenticate with cloudflare and use the api and not be blocked. This cookie is known for expirering quickly, for now the 
solution is to manualy copy the cookie from a browser and paste it it (i am working on an automatic system).

Now that we know what each cookie does, how to actually get them? (please note the tutorial for getting the cookies is for firefox)

Firstly navigate to [lyntr](https://lyntr.com) and press `Control+S+I`, you should be meet with this
![devtools open](readme_images/devtools1.png)

Now navigate to the `Storage` tab
![devtools storage tab](readme_images/devtools2.png)

And click on `Cookies > https://lyntr.com`
![devtools cookies tab open](readme_images/devtools3.png)

Now copy the `_TOKEN_DO_NOT_SHARE` cookie to the file `.env` to a variable named `TOKEN`, the `temp-discord-token` cookie to `temp-discord-token` and the `cf_clearance` cookie to `cf_clearance`.

If you do all these steps correctly you should be able to start implementing the wrapper in your code.

Happy Codeing.

# ToDo
- [ ] Add photo support for lynting
- [ ] Add auto cloudflare cookies collector from browser to .env is not required