Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
reference install from main readme
Browse files Browse the repository at this point in the history
  • Loading branch information
acatav committed Oct 24, 2023
1 parent 875c888 commit 9561db1
Showing 1 changed file with 3 additions and 42 deletions.
45 changes: 3 additions & 42 deletions docs/library.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,50 +17,12 @@ The idea behind Resin library is to provide a framework to build AI applications

![class architecture](../.readme-content/class_architecture.png)

## Installation
## Setup

To install Resin, you only need to run a single command:

```bash
pip install pinecone-resin
```

It is highly recommended to use a virtual environment for you project. You can read more about virtual environments [here](https://docs.python.org/3/tutorial/venv.html).
To setup resin, please follow the instructions [here](../README.md#setup).

## Quickstart


### Step 0: Set up the environment variables

Before you start using Resin, you need to set up the following environment variables:

```bash
export PINECONE_API_KEY="<PINECONE_API_KEY>"
export PINECONE_ENVIRONMENT="<PINECONE_ENVIRONMENT>"
export OPENAI_API_KEY="<OPENAI_API_KEY>"
```

or you can directly set them in your python code:

```python
import os
os.environ["PINECONE_API_KEY"] = "<PINECONE_API_KEY>"
os.environ["PINECONE_ENVIRONMENT"] = "<PINECONE_ENVIRONMENT>"
os.environ["OPENAI_API_KEY"] = "<OPENAI_API_KEY>"
```


<details>
<summary> 👉 click here for more details</summary>

| Name | Description | How to get it? |
|-----------------------|-----------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `PINECONE_API_KEY` | The API key for Pinecone. Used to authenticate to Pinecone services to create indexes and to insert, delete and search data | Register or log into your Pinecone account in the [console](https://app.pinecone.io/). You can access your API key from the "API Keys" section in the sidebar of your dashboard |
| `PINECONE_ENVIRONMENT`| Determines the Pinecone service cloud environment of your index e.g `west1-gcp`, `us-east-1-aws`, etc | You can find the Pinecone environment next to the API key in [console](https://app.pinecone.io/) |
| `OPENAI_API_KEY` | API key for OpenAI. Used to authenticate to OpenAI's services for embedding and chat API | You can find your OpenAI API key [here](https://platform.openai.com/account/api-keys). You might need to login or register to OpenAI services |
</details>


### Step 1: Initialize global Tokenizer

The `Tokenizer` object is used for converting text into tokens, which is the basic data represntation that is used for processing.
Expand Down Expand Up @@ -148,7 +110,7 @@ You can always verify the connection to the Pinecone index with the `verify_inde
kb.verify_index_connection()
```

To learn more about customizing the KnowledgeBase and its inner components, see [understanding knowledgebase workings section](#understanding_knowledgebase).
To learn more about customizing the KnowledgeBase and its inner components, see [understanding knowledgebase workings section](#understanding-knowledgebase-workings).

### Step 3: Upsert and query data

Expand Down Expand Up @@ -243,7 +205,6 @@ TBD
</details>


<a id="understanding_knowledgebase"></a>
## Understanding KnowledgeBase workings

The knowledge base is an object that is responsible for storing and query your data. It holds a connection to a single Pinecone index and provides a simple API to insert, delete and search textual documents.
Expand Down

0 comments on commit 9561db1

Please sign in to comment.