From de9eee2c5cc3812de679650a5624f3164c2cd69e Mon Sep 17 00:00:00 2001 From: Travis Addair Date: Wed, 15 Nov 2023 21:41:03 -0700 Subject: [PATCH] Updated main README --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 38eeef7cf..db6c78dfe 100644 --- a/README.md +++ b/README.md @@ -73,31 +73,31 @@ You can then query the model using either the `/generate` or `/generate_stream` ```shell curl 127.0.0.1:8080/generate \ -X POST \ - -d '{"inputs":"What is Deep Learning?","parameters":{"max_new_tokens":20}}' \ + -d '{"inputs":"What is Deep Learning?","parameters":{"adapter_id":"some/adapter"}}' \ -H 'Content-Type: application/json' ``` ```shell curl 127.0.0.1:8080/generate_stream \ -X POST \ - -d '{"inputs":"What is Deep Learning?","parameters":{"max_new_tokens":20}}' \ + -d '{"inputs":"What is Deep Learning?","parameters":{"adapter_id":"some/adapter"}}' \ -H 'Content-Type: application/json' ``` or from Python: ```shell -pip install lorax +pip install lorax-client ``` ```python from lorax import Client client = Client("http://127.0.0.1:8080") -print(client.generate("What is Deep Learning?", max_new_tokens=20).generated_text) +print(client.generate("What is Deep Learning?", adapter_id="some/adapter").generated_text) text = "" -for response in client.generate_stream("What is Deep Learning?", max_new_tokens=20): +for response in client.generate_stream("What is Deep Learning?", adapter_id="some/adapter"): if not response.token.special: text += response.token.text print(text) @@ -105,8 +105,7 @@ print(text) ### 📓 API documentation -You can consult the OpenAPI documentation of the `lorax-inference` REST API using the `/docs` route. -The Swagger UI is also available at: [https://huggingface.github.io/lorax-inference](https://huggingface.github.io/lorax-inference). +You can consult the OpenAPI documentation of the `lorax` REST API using the `/docs` route. ### 🛠️ Local install