Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5056be8
Initial plan
Copilot Jan 31, 2026
947ed69
Add database migration and encryption utilities
Copilot Jan 31, 2026
c29773a
Update SQLC queries for Definitions and Instances architecture
Copilot Jan 31, 2026
41ea9fc
Add comprehensive documentation for LLM service refactoring
Copilot Jan 31, 2026
7da6237
Fix query and table names, add API standards seeding and instance man…
Copilot Jan 31, 2026
9ac8d69
Update handlers to use new Instance architecture with encryption support
Copilot Jan 31, 2026
661de5a
Add ENCRYPTION_KEY to template.env and complete implementation summary
Copilot Jan 31, 2026
40adb5f
Address PR feedback: fix indexes, migration steps, API standards, fie…
Copilot Feb 1, 2026
5a43731
Remove redundant users_llm_service_instances table - ownership tracke…
Copilot Feb 1, 2026
374818c
Fix test file - update LLMServiceHandle to InstanceHandle in validati…
Copilot Feb 1, 2026
b2b9264
Update embeddings tests to use instance_handle instead of llm_service…
Copilot Feb 1, 2026
3afe870
Fix GetAllAccessibleLLMInstances query - remove user_handle from JOIN…
Copilot Feb 1, 2026
c2de1ca
Fix GetAllAccessibleLLMInstances generated code and update test expec…
Copilot Feb 1, 2026
02dc010
Add test refactoring summary documentation
Copilot Feb 1, 2026
6c5d8e4
Add performance optimization notes for future improvements
Copilot Feb 1, 2026
98e5d84
Consolidate documentation into single file in docs folder
Copilot Feb 1, 2026
a3cadac
Add comprehensive client migration guide to documentation
Copilot Feb 1, 2026
4f351c2
Fix code review feedback: correct JSON comment syntax and clarify bac…
Copilot Feb 1, 2026
ff0a756
Revise all changes, many updates.
Feb 4, 2026
a0f83b8
Add sharing functionality for LLM Service Definitions and Instances
Copilot Feb 4, 2026
c09e968
Add comprehensive tests for LLM service sharing functionality
Copilot Feb 4, 2026
a9d6c19
Remove obsolete llm_processes.go file.
Feb 4, 2026
457c9ab
Fix compilation errors and migration foreign key constraint issue
Copilot Feb 4, 2026
25c2412
Fix unique VDB key constraint issue in sharing tests by generating di…
Copilot Feb 4, 2026
df8c07c
Fix all the things.
Feb 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ postgres=# CREATE EXTENSION IF NOT EXISTS vector;

Clients should communicate the API key in the `Authorization` header with a `Bearer` prefix, e.g. `Bearer 024v2013621509245f2e24`. Most operations can only be done by the (admin or the) owner of the resource in question. For projects and their embeddings, you can define other user accounts that should be authorized as readers, too.

**Public Access**: Projects can be made publicly accessible (allowing unauthenticated read access to embeddings and similars) by including `"*"` in the `authorizedReaders` array when creating or updating the project. See [docs/PUBLIC_ACCESS.md](./docs/PUBLIC_ACCESS.md) for details.
**Public Access**: Projects can be made publicly accessible (allowing unauthenticated read access to embeddings and similars) by including `"*"` in the `shared_with` array when creating or updating the project. See [docs/PUBLIC_ACCESS.md](./docs/PUBLIC_ACCESS.md) for details.

## Data Validation

Expand Down Expand Up @@ -302,15 +302,15 @@ For resources that support both GET and PUT operations, PATCH requests are autom
**Example: Enable world-readable access for a project**
```bash
curl -X PATCH https://<hostname>/v1/projects/alice/myproject \
-H "Authorization: Bearer <api_key>" \
-H "Authorization: Bearer <vdb_key>" \
-H "Content-Type: application/json" \
-d '{"authorizedReaders": ["*"]}'
-d '{"shared_with": ["*"]}'
```

**Example: Update project description**
```bash
curl -X PATCH https://<hostname>/v1/projects/alice/myproject \
-H "Authorization: Bearer <api_key>" \
-H "Authorization: Bearer <vdb_key>" \
-H "Content-Type: application/json" \
-d '{"description": "Updated project description"}'
```
Expand Down Expand Up @@ -367,7 +367,7 @@ dhamps-vdb/
│ │ ├── handlers.go
│ │ ├── handlers_test.go
│ │ ├── llm_processes.go
│ │ ├── llm_services.go
│ │ ├── instances.go
│ │ ├── llm_services_test.go
│ │ ├── projects.go
│ │ ├── projects_test.go
Expand All @@ -379,7 +379,7 @@ dhamps-vdb/
│ ├── api_standards.go
│ ├── embeddings.go
│ ├── llm_processes.go
│ ├── llm_services.go
│ ├── instances.go
│ ├── options.go
│ ├── projects.go
│ ├── similars.go
Expand Down Expand Up @@ -416,27 +416,33 @@ dhamps-vdb/
- [x] Validation with metadata schema
- [x] Allow to filter similar passages by metadata field (so as to exclude e.g. documents from the same author)
- [ ] Add documentation (the GET query parameters are called `metadata_path` and `metadata_value` as in: `https://xy.org/vdb-api/v1/similars/sal/sal-openai-large/https%3A%2F%2Fid.myproject.net%2Ftexts%2FW0011%3A1.3.1.3.1?threshold=0.7&limit=5&metadata_path=author_id&metadata_value=A0083`)
- [x] Use **transactions** (most importantly, when an action requires several queries, e.g. projects being added and then linked to several read-authorized users)
- [ ] Prevent acceptance of requests as user "_system"
- [ ] Implement and make consequent use of **max_idle** (5), **max_concurr** (5), **timeouts**, and **cancellations**
- [ ] **Concurrency** (leaky bucket approach) and **Rate limiting** (redis, sliding window, implement headers)
- [ ] Use **transactions** (most importantly, when an action requires several queries, e.g. projects being added and then linked to several read-authorized users)
- [ ] Use PATCH method to change existing resources
- [x] Add mechanism to allow anonymous/public reading access to embeddings (via `"*"` in `authorizedReaders`)
- [ ] Always use specific error messages
- [ ] Add project sharing/unsharing functions & API paths
- [ ] Add definition creation/listing/deletion functions & paths
- [ ] Allow to request verbose information even in list outputs (with a verbose=yes query parameter?)
- [ ] Add possiblity to use PATCH method to change existing resources
- [x] Add mechanism to allow anonymous/public reading access to embeddings (via `"*"` in `shared_with`)
- [ ] **Dockerization**
- [ ] **Batch mode**
- [ ] **Link or unlink** users/LLMs as standalone operations
- [ ] **Transfer** of projects from one owner to another as new operation
- [ ] Fix automatically generated documentation
- [ ] Revisit all documentation
- [ ] Proper **logging** with `--verbose` and `--quiet` modes
- [ ] Caching
- [ ] HTML UI?
- [ ] LLM handling processing (receive text and send it to an llm service on the user's behalf, then store the results)
- [ ] allow API keys for services to be read from env variables (on the server, but still maybe useful)
- [ ] calls to LLM services
- [ ] include rate limiting in service definitions/instances and obey it in proxying

## License

[MIT License](./LICENSE)

## Versions

- 2026-02-XX **v0.1.0**: Fix many things, add many things, still API v1 on the way to stable...
- 2024-12-10 **v0.0.1**: Initial public release (still work in progress) of API v1
12 changes: 6 additions & 6 deletions api/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ paths:
type: string
email:
type: string
apiKey:
VDBKey:
type: string
responses:
"200":
Expand Down Expand Up @@ -107,7 +107,7 @@ paths:
type: string
email:
type: string
apiKey:
VDBKey:
type: string
responses:
"200":
Expand Down Expand Up @@ -308,7 +308,7 @@ components:
email:
type: string
format: email
apiKey:
VDBKey:
type: string
minLength: 32
maxLength: 32
Expand All @@ -321,7 +321,7 @@ components:
required:
- handle
- email
- apiKey
- VDBKey
project:
type: object
properties:
Expand All @@ -332,15 +332,15 @@ components:
description:
type: string
maxLength: 255
authorizedReaders:
shared_with:
type: array
items:
type: string
minLength: 3
maxLength: 20
uniqueItems: true
default: ["*"]
llmservices:
instances:
type: array
items:
type: string
Expand Down
Binary file added dhamps-vdb
Binary file not shown.
Loading