Skip to content
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

server: allow filtering llama server response fields #10940

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

Conversation

nvrxq
Copy link

@nvrxq nvrxq commented Dec 21, 2024

This adds a new feature. Allow Filtering LLama Server Response Fields from #10819.
Usage:
Curl:

curl --request POST \
    --url http://localhost:8080/completion \
    --header "Content-Type: application/json" \
    --data '{"prompt": "Building a website can be done in 10 simple steps:","n_predict": 128, "requested_fields": ["content", "generation_settings/n_predict"]}'

Response:

{"content":" 1. Choose a domain name...","generation_settings/n_predict":128}
Retrievals from multiple nested lists are also supported, example:
data  = {"key1" : {"key2": 3}} requested_fields = ["key1/key2"] - > {"key1/key2": 3}.

If response does not contain a path, we will return empty json for path.

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