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

Update client docs with new endpoint source #126

Merged
merged 5 commits into from
Dec 21, 2023
Merged

Conversation

abidwael
Copy link
Contributor

No description provided.

@@ -67,7 +67,7 @@ Example:
```python
from lorax import Client

endpoint_url = f"https://api.app.predibase.com/v1/llms/{llm_deployment_name}"
endpoint_url = f"https://serving.app.predibase.com/{predibase_tenant_id}/llm/llm-deployment-{llm_deployment_name}/generate"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove the llm-deployment- when resolving the URL in the backend - we would need to update the VS for this too.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1, less verbose the better.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you also explain how to obtain the tenant ID?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, we need to use / endpoint, not /generate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated with information on the tenant short code. I'll need to update the VS to add / as a supported route

@abidwael abidwael merged commit 0881a49 into main Dec 21, 2023
1 check passed
@abidwael abidwael deleted the update-serving-host branch December 21, 2023 18:51
@@ -155,7 +155,9 @@ def generate(
payload = resp.json()
if resp.status_code != 200:
raise parse_error(resp.status_code, payload)
return Response(**payload[0])
if isinstance(payload, list):
return Response(**payload[0])
Copy link
Contributor

Choose a reason for hiding this comment

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

This smells like bad design IMO. The REST API should be consistent and predictable. We should not be writing client-side hacks to account for inconsistency in the REST API.

tgaddair added a commit that referenced this pull request Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants