Skip to content

Commit

Permalink
Do some refactor after LlamaIndex as a Datastore. (openai#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxuqi authored May 8, 2023
1 parent d2e0298 commit 3ed6df1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ Follow these steps to quickly set up and run the ChatGPT Retrieval Plugin:
export REDIS_DOC_PREFIX=<your_redis_doc_prefix>
export REDIS_DISTANCE_METRIC=<your_redis_distance_metric>
export REDIS_INDEX_TYPE=<your_redis_index_type>
# Llama
export LLAMA_INDEX_TYPE=<gpt_vector_index_type>
export LLAMA_INDEX_JSON_PATH=<path_to_saved_index_json_file>
export LLAMA_QUERY_KWARGS_JSON_PATH=<path_to_saved_query_kwargs_json_file>
export LLAMA_RESPONSE_MODE=<response_mode_for_query>
```

10. Run the API locally: `poetry run start`
Expand Down Expand Up @@ -469,3 +475,6 @@ We would like to extend our gratitude to the following contributors for their co
- [Redis](https://redis.io/)
- [spartee](https://github.com/spartee)
- [tylerhutcherson](https://github.com/tylerhutcherson)
- [LlamaIndex](https://github.com/jerryjliu/llama_index)
- [jerryjliu](https://github.com/jerryjliu)
- [Disiok](https://github.com/Disiok)
20 changes: 10 additions & 10 deletions docs/providers/llama/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ with ChatGPT and your external data.

**Retrieval App Environment Variables**

| Name | Required | Description |
| ---------------- | -------- | -------------------------------------- |
| Name | Required | Description |
|------------------|----------|-------------------------------------|
| `DATASTORE` | Yes | Datastore name. Set this to `llama` |
| `BEARER_TOKEN` | Yes | Your secret token |
| `OPENAI_API_KEY` | Yes | Your OpenAI API key |
| `BEARER_TOKEN` | Yes | Your secret token |
| `OPENAI_API_KEY` | Yes | Your OpenAI API key |

**Llama Datastore Environment Variables**

| Name | Required | Description | Default |
| ------------------------------- | -------- | ------------------------------------------------------------------ | ------------------ |
| `LLAMA_INDEX_TYPE` | Optional | Index type (see below for details) | `simple_dict` |
| `LLAMA_INDEX_JSON_PATH` | Optional | Path to saved Index json file | None |
| `LLAMA_QUERY_KWARGS_JSON_PATH` | Optional | Path to saved query kwargs json file | None |
| `LLAMA_RESPONSE_MODE` | Optional | Response mode for query | `no_text` |
| Name | Required | Description | Default |
|--------------------------------|----------|--------------------------------------|---------------|
| `LLAMA_INDEX_TYPE` | Optional | Index type (see below for details) | `simple_dict` |
| `LLAMA_INDEX_JSON_PATH` | Optional | Path to saved Index json file | None |
| `LLAMA_QUERY_KWARGS_JSON_PATH` | Optional | Path to saved query kwargs json file | None |
| `LLAMA_RESPONSE_MODE` | Optional | Response mode for query | `no_text` |


**Different Index Types**
Expand Down

0 comments on commit 3ed6df1

Please sign in to comment.