Skip to content

Commit 96ea871

Browse files
committed
📝 doc: Update README.md
1 parent 1eb55e9 commit 96ea871

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Semantic Book Search with Go, pgvector, and Gemini API
1+
# Semantic Book Search with Go, pgvector, and Gemini API <img src="https://github.com/egonelbre/gophers/blob/master/.thumb/animation/gopher-dance-long.gif?raw=true" alt="Gopher Dancing" width="30"/>
22

33
[![Release with GoReleaser](https://github.com/nmdra/Semantic-Search/actions/workflows/release.yaml/badge.svg)](https://github.com/nmdra/Semantic-Search/actions/workflows/release.yaml)
44
[![golangci-lint](https://github.com/nmdra/Semantic-Search/actions/workflows/golangci-lint.yaml/badge.svg)](https://github.com/nmdra/Semantic-Search/actions/workflows/golangci-lint.yaml)
@@ -58,9 +58,23 @@ C4Context
5858
5959
### API Endpoints
6060
61-
* `POST /books` — Add a book with title and description; stores embedding in DB
62-
* `GET /search?q=your+query` — Search books semantically by query text
63-
* `GET /ping` — Health check endpoint
61+
* **`POST /books`**
62+
Add a new book by providing its title and description. The service generates and stores a semantic embedding of the description in the database.
63+
64+
* **`GET /search?q=your+query`**
65+
Perform a semantic search on the stored books using the query text. Returns a list of matching books ranked by relevance.
66+
67+
* **`GET /ping`**
68+
Simple health check endpoint to verify if the service is running.
69+
70+
#### Example Usage
71+
72+
Search for books related to *Science fiction that describe Social Hierarchy*:
73+
74+
```bash
75+
curl -sG "http://localhost:8080/search" --data-urlencode "q=Science fiction that describe Social Hierarchy" | jq
76+
```
77+
<img width="1331" height="705" alt="image" src="https://github.com/user-attachments/assets/d11a4a23-1260-4809-8416-bcf2986f5154" />
6478

6579
### Setup PostgreSQL
6680

0 commit comments

Comments
 (0)