Skip to content

Commit 0a4c871

Browse files
committed
update the cicd workflow
add readme docs for new openai compatible endpoint
1 parent 1db2486 commit 0a4c871

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

.github/workflows/ci-cd.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: CI/CD Pipeline
22

33
on:
44
push:
5+
paths-ignore:
6+
- 'README.md'
57
branches:
68
- master
79

README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The service uses the following environment variables:
3333

3434
## 💡 API Endpoints
3535

36-
The service exposes two primary endpoints for generating embeddings.
36+
The service exposes three primary endpoints for generating embeddings.
3737

3838
### 1. Embed Text
3939

@@ -83,6 +83,44 @@ The service exposes two primary endpoints for generating embeddings.
8383
}
8484
```
8585

86+
### 3. OpenAI-Compatible Embeddings
87+
88+
* **Endpoint:** `POST /v1/embeddings`
89+
* **Description:** Generates embeddings for images using an OpenAI-compatible API interface.
90+
* **Request Body (`application/json`):**
91+
```json
92+
{
93+
"model": "clip-ViT-B-32",
94+
"input": [
95+
"https://example.com/image1.jpg",
96+
"https://example.com/image2.png"
97+
]
98+
}
99+
```
100+
* **Response Body (`application/json`):**
101+
```json
102+
{
103+
"object": "list",
104+
"data": [
105+
{
106+
"object": "embedding",
107+
"embedding": [0.123, 0.456, ...],
108+
"index": 0
109+
},
110+
{
111+
"object": "embedding",
112+
"embedding": [0.789, 0.101, ...],
113+
"index": 1
114+
}
115+
],
116+
"model": "clip-ViT-B-32",
117+
"usage": {
118+
"prompt_tokens": 0,
119+
"total_tokens": 0
120+
}
121+
}
122+
```
123+
86124
### Health Check
87125

88126
* **Endpoint:** `GET /health`

0 commit comments

Comments
 (0)