Skip to content

Support for configurable URL prefix in llamafiler#604

Merged
jart merged 3 commits intomozilla-ai:mainfrom
vlasky:llamafiler-url-prefix
Oct 29, 2024
Merged

Support for configurable URL prefix in llamafiler#604
jart merged 3 commits intomozilla-ai:mainfrom
vlasky:llamafiler-url-prefix

Conversation

@vlasky
Copy link
Copy Markdown
Contributor

@vlasky vlasky commented Oct 28, 2024

Added support for new llamafiler commandline parameter --url-prefix or -u

This specifies a URL prefix (subdirectory) under which the llamafiler HTTP server will make the API accessible, e.g. /lamafiler.

Useful when running llamafiler behind a reverse proxy such as NGINX or Redbean.

By default, this is set to / (root).

Added support for new llamafiler commandline parameter --url-prefix or -u

This specifies a URL prefix (subdirectory) under which the llamafiler HTTP server will make the API accessible, e.g. /lamafiler.

Useful when running llamafiler behind a reverse proxy such as NGINX or Redbean.

By default, this is set to / (root).
@vlasky
Copy link
Copy Markdown
Contributor Author

vlasky commented Oct 28, 2024

This is a sequel to #597 which added configurable URL prefix support to the llamafile command.

I felt a bit perplexed by the existing llamafiler codebase, which seems to be a scattered mix of C and C++ code, so I implemented this in a manner that I considered understandable.

Wondering if the short form version of commandline parameter -u should be renamed as perhaps this could be mistaken for something else?

Copy link
Copy Markdown
Collaborator

@jart jart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jart jart merged commit 108191a into mozilla-ai:main Oct 29, 2024
jart added a commit that referenced this pull request Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants