Skip to content

Commit 97454fa

Browse files
authored
docs: remove curl test from installation guides (#1861)
* docs: remove curl test for modal tutorial * docs: remove curl test for skypilot tutorial
1 parent ea68ac4 commit 97454fa

File tree

3 files changed

+4
-52
lines changed

3 files changed

+4
-52
lines changed

website/docs/installation/modal/index.md

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -130,36 +130,6 @@ def app():
130130

131131
Once we deploy this model with `modal serve app.py`, it will output the url of the web endpoint, in a form of `https://<USERNAME>--tabby-server-starcoder-1b-app-dev.modal.run`.
132132

133-
To test if the server is working, you can send a post request to the web endpoint.
134-
135-
```shell
136-
curl --location 'https://<USERNAME>--tabby-server-starcoder-1b-app-dev.modal.run/v1/completions' \
137-
--header 'Content-Type: application/json' \
138-
--data '{
139-
"language": "python",
140-
"segments": {
141-
"prefix": "def fib(n):\n ",
142-
"suffix": "\n return fib(n - 1) + fib(n - 2)"
143-
}
144-
}'
145-
```
146-
147-
If you can get json response like in the following case, the app server is up and have fun!
148-
149-
```json
150-
{
151-
"id": "cmpl-4196b0c7-f417-4c48-9329-4a56aa86baea",
152-
"choices": [
153-
{
154-
"index": 0,
155-
"text": "if n == 0:\n return 0\n elif n == 1:\n return 1\n else:"
156-
}
157-
]
158-
}
159-
```
160-
161-
162-
163133
![App Running](./app-running.png)
164134

165135
Now it can be used as tabby server url in tabby editor extensions!

website/docs/installation/skypilot/index.md

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ resources:
2121

2222
Skypilot supports GPU from various cloud vendors. Please refer to the official [Skypilot documentation](https://skypilot.readthedocs.io/en/latest/getting-started/installation.html) for detailed installation instructions.
2323

24-
As Tabby exposes its health check at `/v1/health`, we can define the following service configuration:
24+
Tabby exposes its health check at the `/metrics` endpoint, which also serves as a prometrics endpoint. Therefore, we can define the following readiness probe:
2525

2626
```yaml
2727
service:
28-
readiness_probe: /v1/health
28+
readiness_probe: /metrics
2929
replicas: 1
3030
```
3131
@@ -52,7 +52,7 @@ This finishes launching SkyServe's control VM which runs a load balancer for thi
5252
When you execute the following command, you'll encounter a message indicating that the replica is not ready:
5353

5454
```bash
55-
$ curl -L 'http://44.203.34.65:30001/v1/health'
55+
$ curl -L 'http://44.203.34.65:30001/metrics'
5656
5757
{"detail":"No available replicas. Use \"sky serve status [SERVICE_NAME]\" to check the replica status."}%
5858
```
@@ -68,22 +68,4 @@ Once the service is ready, you will see something like the following:
6868

6969
![tabby ready](./tabby-ready.png)
7070

71-
SkyServe uses a redirect load balancer at its front, so the `-L` command is necessary if you would like to test the completion api with `curl`.
72-
73-
```bash
74-
$ curl -L -X 'POST' \
75-
'http://44.203.34.65:30001/v1/completions' \
76-
-H 'accept: application/json' \
77-
-H 'Content-Type: application/json' \
78-
-d '{
79-
"language": "python",
80-
"segments": {
81-
"prefix": "def fib(n):\n ",
82-
"suffix": "\n return fib(n - 1) + fib(n - 2)"
83-
}
84-
}'
85-
86-
{"id":"cmpl-ba9aae81-ed9c-419b-9616-fceb92cdbe79","choices":[{"index":0,"text":" if n <= 1:\n return n"}]}
87-
```
88-
8971
Now, you can utilize the load balancer URL (`http://44.203.34.65:30001` in this case) within Tabby editor extensions. Please refer to [`tabby.yaml`](https://github.com/TabbyML/tabby/blob/main/website/docs/installation/skypilot/tabby.yaml) for the full configuration used in this tutorial.

website/docs/installation/skypilot/tabby.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ resources:
66
# accelerators: {T4:1, L4:1, A100:1, A10G:1}
77

88
service:
9-
readiness_probe: /v1/health
9+
readiness_probe: /metrics
1010
replicas: 1
1111

1212
run: |

0 commit comments

Comments
 (0)