You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+60-12Lines changed: 60 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,17 @@
1
1
# vector-embedding-api
2
-
`vector-embedding-api`provides a Flask API server and client to generate text embeddings using either [OpenAI's embedding model](https://platform.openai.com/docs/guides/embeddings) or the [SentenceTransformers](https://www.sbert.net/) library. The API server also offers an in-memory cache for embeddings and returns results from the cache when available.
2
+
`vector-embedding-api`provides a Flask API server and client to generate text embeddings using either [OpenAI's embedding model](https://platform.openai.com/docs/guides/embeddings) or the [SentenceTransformers](https://www.sbert.net/) library. The API server now supports in-memory LRU caching for faster retrievals, batch processing for handling multiple texts at once, and a health status endpoint for monitoring the server status.
3
3
4
4
SentenceTransformers supports over 500 models via [HuggingFace Hub](https://huggingface.co/sentence-transformers).
5
5
6
6
## Features 🎯
7
7
* POST endpoint to create text embeddings
8
8
* sentence_transformers
9
9
* OpenAI text-embedding-ada-002
10
-
* In-memory cache for embeddings
10
+
* In-memory LRU cache for quick retrieval of embeddings
11
+
* Batch processing to handle multiple texts in a single request
11
12
* Easy setup with configuration file
12
-
*Simple integration with other applications
13
-
* Python client utility for submitting text
13
+
*Health status endpoint
14
+
* Python client utility for submitting text or files
14
15
15
16
### Installation 💻
16
17
To run this server locally, follow the steps below:
@@ -33,9 +34,8 @@ pip install -r requirements.txt
33
34
```
34
35
35
36
### Usage
36
-
Modify the [server.conf](/server.conf) file to specify a SentenceTransformers model, your OpenAI API key, or both.
37
37
38
-
**Modify the server.conf configuration file:** ⚙️
38
+
**Modify the [server.conf](/server.conf) configuration file:** ⚙️
39
39
```ini
40
40
[main]
41
41
openai_api_key = YOUR_OPENAI_API_KEY
@@ -52,19 +52,19 @@ The server should now be running on http://127.0.0.1:5000/.
52
52
53
53
### API Endpoints 🌐
54
54
##### Client Usage
55
-
A small [Python client](/client.py) is provided to assist with submitting text strings or text files.
55
+
A small [Python client](/client.py) is provided to assist with submitting text strings or files.
0 commit comments