-
Notifications
You must be signed in to change notification settings - Fork 11
feat: add configurable remote engine API URL for embedding requests - #5
feat: add configurable remote engine API URL for embedding requests #5ntklink wants to merge 1 commit into
Conversation
Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Copilot
AI
Apr 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).
marcobambini
commented
May 5, 2026
@neotty I like the idea, but changing the remote engine API URL for embedding requests means the remote reply format could also change, and there is no way to customize the parsing
ntklink
commented
May 5, 2026
@marcobambini Can we define some fixed standard formats, such as OpenAI's https://developers.openai.com/api/docs/guides/embeddings
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