feat: add configurable remote engine API URL for embedding requests#5
feat: add configurable remote engine API URL for embedding requests#5neotty wants to merge 1 commit intosqliteai:mainfrom
Conversation
Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Pull request overview
This PR makes the remote embedding endpoint configurable at build time by introducing a Makefile variable that is propagated into the C compilation defines, replacing the previously hardcoded URL in the remote embedding implementation.
Changes:
- Added
REMOTE_ENGINE_API_URLMakefile variable (with a default) and exposed it inhelp/varsoutput. - Propagated
REMOTE_ENGINE_API_URLinto compilation defines asDBMEM_REMOTE_API_URL. - Updated the remote embedding code to use
DBMEM_REMOTE_API_URLwith an in-source fallback default.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/dbmem-rembed.c |
Uses DBMEM_REMOTE_API_URL (with a fallback default) instead of a hardcoded endpoint for remote embedding requests. |
Makefile |
Adds REMOTE_ENGINE_API_URL, prints it in help/vars, and passes it to the compiler as -DDBMEM_REMOTE_API_URL=.... |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ifeq ($(OMIT_REMOTE_ENGINE),0) | ||
| C_SOURCES += $(SRC_DIR)/dbmem-rembed.c | ||
| override DEFINES += -DDBMEM_REMOTE_API_URL=\"$(REMOTE_ENGINE_API_URL)\" |
There was a problem hiding this comment.
This line starts with a tab character while in a top-level ifeq block (not inside a recipe). In GNU Make, a leading tab is treated as a recipe line and will error with “recipe commences before first target”. Remove the leading tab and align indentation with the surrounding variable assignments (spaces only).
| override DEFINES += -DDBMEM_REMOTE_API_URL=\"$(REMOTE_ENGINE_API_URL)\" | |
| override DEFINES += -DDBMEM_REMOTE_API_URL=\"$(REMOTE_ENGINE_API_URL)\" |
This merge request makes the remote embedding API endpoint configurable at build time, instead of being hardcoded in source.
What changed
How to use
make
make REMOTE_ENGINE_API_URL=https://your-endpoint/v1/embeddings
make remote REMOTE_ENGINE_API_URL=https://your-endpoint/v1/embeddings
Validation