Skip to main content

Crate loqui_server

Crate loqui_server 

Source
Expand description

An authenticated, explicitly exposed HTTP front end for a loqui Engine, speaking the OpenAI audio API.

The defaults are the narrow ones:

  • It listens on a Unix socket in $XDG_RUNTIME_DIR (mode 0600, in a 0700 directory) and accepts only processes running as the same user. TCP must be asked for, and network-wide TCP must be asked for twice. See Listen.
  • Every TCP request needs a bearer token, loopback included. With none configured, one is generated and stored with mode 0600. See auth.
  • Requests from web pages (anything carrying Origin) are refused, TCP requests must name an expected Host, and there is no CORS.
  • Bodies, text length, audio length, queue depth, header arrival and request time are all bounded.

SECURITY.md describes the exposure model in full, and Embedding loqui safely covers choosing a listener and tokens.

Re-exports§

pub use listen::Acknowledgements;
pub use listen::Listen;

Modules§

api
The OpenAI-compatible routes.
auth
Bearer tokens.
fs
Private files and the default places loqui keeps them.
listen
Where the server listens, and the rules for each choice.
policy
Who may call what: authentication, browser refusal, Host checking.

Structs§

Server
A server ready to run: bound, with its tokens resolved.
ServerConfig
Everything about how the server is exposed.

Enums§

Error