Skip to content

chore(server): split context-server to its own file #13987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mudler
Copy link
Contributor

@mudler mudler commented Jun 3, 2025

This is in order to improve maintainability and re-usability by downstream projects such as LocalAI (see mudler/LocalAI#5379 for context).

The context server is a struct that can be re-used quite heavily by other communication protocols. For instance, LocalAI uses the context server on top of gRPC rather than having a REST API. This change improves overall re-usability by isolating the REST API to its own file so the context server can be imported easily.

cc @ggerganov @ngxson would be great guys if we could upstream this change. This would really help us to streamline llama.cpp integration and have less moving pieces. C++ ain't my cup of tea, so I'm not sure I've done anything according to llama.cpp/C++ standards, feedback is welcome and I'd be happy to address it!

Make sure to read the contributing guidelines before submitting a PR

@mudler
Copy link
Contributor Author

mudler commented Jun 3, 2025

mm not sure about https://github.com/ggml-org/llama.cpp/actions/runs/15414213443/job/43373059365?pr=13987 - it compiles fine locally here. It looks just a timeout?

This is in order to improve maintainability and re-usability by
downstream projects such as LocalAI (see
mudler/LocalAI#5379 for context).

The context server is a struct that can be re-used quite heavily by
other communication protocols. For instance, LocalAI uses the context
server on top of gRPC rather than having a REST API. This change
improves overall re-usability by isolating the REST API to its own file
so the context server can be imported easily.

Signed-off-by: mudler <[email protected]>
@mudler mudler force-pushed the chore/split_context_server branch from de17206 to b7f15f5 Compare June 3, 2025 13:33
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.

1 participant