Skip to content

Commit

Permalink
docs: add auto enable conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobLinCool committed Apr 20, 2023
1 parent c87c952 commit 9324caa
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,6 @@ Currently, the following implementations are available:
- **Cache**
- [x] `CloudflareCache`: Use Cloudflare's Cache API
- [x] `MemoryCache`: Only for local development, it just "don't cache anything"

> The auto module will automatically load the correct implementation based on the environment variables.
> See [src/lib/server/auto/index.ts](./src/lib/server/auto/index.ts)
9 changes: 9 additions & 0 deletions src/lib/server/cloudflare/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Cloudflare

## CloudflareKVObjStore

Enable when `KV` is binding to a KV namespace.

## CloudflareCache

Enable in Cloudflare's serverless environment. (`caches.default` is available)
10 changes: 10 additions & 0 deletions src/lib/server/cohere/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Cohere

## CohereEncoder

Enable when `COHERE_API_KEY` is set.

Configurable through environment variables:

- `COHERE_EMBED_MODEL`: The model to use for embedding. Defaults to `large`.
- `COHERE_EMBED_TRUNCATE`: The truncate strategy to use. Defaults to `LEFT`.
9 changes: 9 additions & 0 deletions src/lib/server/openai/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# OpenAI

## OpenAIEncoder

Enable when `OPENAI_API_KEY` is set.

Configurable through environment variables:

- `OPENAI_EMBED_MODEL`: The model to use for embedding. Defaults to `text-embedding-ada-002`.
5 changes: 5 additions & 0 deletions src/lib/server/pinecone/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Pinecone

## PineconeVecStore

Enable when `PINECONE_API_KEY` and `PINECONE_ENDPOINT` are set.
5 changes: 5 additions & 0 deletions src/lib/server/upstash/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Upstash

## UpstashRedisObjStore

Enable when `UPSTASH_REDIS_REST_URL` and `UPSTASH_REDIS_REST_TOKEN` are set.

0 comments on commit 9324caa

Please sign in to comment.