Bazy wektorowe — API
Autoryzacja: Authorization: Bearer TOKEN
Content-Type: application/json
Endpoints bazy wektorowej
| Metoda |
Ścieżka |
Opis |
| GET |
/noe/vector_dbs.json |
Lista baz wektorowych |
| GET |
/noe/vector_dbs/:id.json |
Szczegóły bazy |
| POST |
/noe/vector_dbs.json |
Utworzenie bazy |
| PATCH |
/noe/vector_dbs/:id.json |
Aktualizacja bazy |
| DELETE |
/noe/vector_dbs/:id.json |
Usunięcie bazy |
| GET |
/noe/vector_dbs/:id/search.json |
Wyszukiwanie wpisów (RAG) |
| GET/POST |
/noe/vector_dbs/:id/chat |
Chat RAG (wyszukaj + odpowiedź LLM) |
Pola bazy wektorowej
| Pole |
Typ |
Wymagane |
Opis |
name |
string |
tak |
Nazwa bazy |
code |
string |
tak |
Kod unikalny (per konto) |
description |
string |
nie |
Opis |
connector_id |
integer |
tak |
ID konektora AI (musi wspierać embeddingi) |
dimensions |
integer |
nie |
Wymiar embeddingu (default: 1536) |
embedding_model |
string |
nie |
Model embeddingu (default: text-embedding-3-small) |
context_limit |
integer |
nie |
Limit wyników wyszukiwania (default: 7) |
system_prompt |
text |
nie |
Prompt systemowy dla RAG |
knowledge_base_id |
integer |
nie |
ID powiązanej bazy wiedzy |
POST — Utworzenie
POST /noe/vector_dbs.json
{
"vector_db": {
"name": "FAQ",
"code": "faq",
"connector_id": 123,
"context_limit": 5,
"system_prompt": "Odpowiadaj na podstawie podanego kontekstu."
}
}
Wyszukiwanie i Chat RAG
GET /noe/vector_dbs/faq/search.json?q=jak+zmienić+hasło
GET /noe/vector_dbs/faq/chat?q=jak+zmienić+hasło&context_limit=3
Endpoints wpisów wektorowych
| Metoda |
Ścieżka |
Opis |
| GET |
/noe/vector_dbs/:id/vector_entries.json |
Lista wpisów |
| POST |
/noe/vector_dbs/:id/vector_entries.json |
Tworzenie wpisu |
| PATCH |
/noe/vector_dbs/:id/vector_entries/:id.json |
Aktualizacja wpisu |
| DELETE |
/noe/vector_dbs/:id/vector_entries/:id.json |
Usunięcie wpisu |
Pola wpisu wektorowego
| Pole |
Typ |
Wymagane |
Opis |
content |
text |
tak |
Treść wpisu |
metadata |
jsonb |
nie |
Metadane wpisu |
kb_entry_id |
integer |
nie |
ID powiązanego wpisu KB |
Embedding jest generowany automatycznie przy tworzeniu/edycji.
POST — Tworzenie wpisu
POST /noe/vector_dbs/faq/vector_entries.json
{
"vector_entry": {
"content": "Aby zmienić hasło, przejdź do ustawień...",
"metadata": { "category": "security" }
}
}