Skip to content

Commit fb8eaaa

Browse files
authored
Merge pull request #140 from NYU-RTS/pythia_cleanup
genai cleanup
2 parents be61df6 + b191aee commit fb8eaaa

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed
Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
# Quickstart
2+
3+
:::danger[Access to Portkey is only permitted via NYU VPN]
4+
The machine sending requests to the LLM gateway needs to be connected to the NYU VPN to access the LLM gateway. If it is not connected to the VPN, your requests will timeout and result in connection errors.
5+
6+
If you are sending requests from a server like Colab notebook while your laptop is on the VPN the requests will fail as the machine sending the requests is the Colab server, not your laptop!
7+
:::
8+
9+
10+
## Getting started with the LLM gateway
11+
212
:::tip[Gateway URL]
313
Whenever you instantiate a Portkey client, the `base_url` must be set to `base_url="https://ai-gateway.apps.cloud.rt.nyu.edu/v1/"`. If you miss this parameter you would be connecting to the vendor's SaaS platform and NYU provisioned virtual keys will not work.
414
:::
515

6-
## Getting started with Portkey
7-
As part of the onboarding process, you would have received an invite which gives you access to a workspace. We will also add virtual keys for LLMs to your workspace as part of the onboarding process. Once you've accepted it, head over to `https://app.portkey.ai/` and select the sign-in with Single Sign-On option and proceed with your NYU email address.
16+
With the virtual key and the API key in hand, you should now be able to run the following snippet of code:
817

9-
:::danger[Access to Portkey is only permitted via NYU VPN]
10-
You need to be connected to the NYU VPN to access the Portkey LLM gateway. If you are not, your requests will timeout and result in connection errors.
11-
:::
1218

13-
You will now be able to create an API key for yourself by access the `API Keys` item on the left sidebar. With an API key and a virtual key at your disposal, you can now run the following script:
1419
```python
1520
from portkey_ai import Portkey
1621

@@ -25,10 +30,10 @@ completion = portkey.chat.completions.create(
2530
{"role": "system", "content": "You are not a helpful assistant"},
2631
{"role": "user", "content": "Say this is a test"},
2732
],
28-
model="gemini-2.0-flash-lite",
33+
model="", # Replace with the LLM model you'd like to use
2934
)
3035

3136
print(completion)
3237
```
3338

34-
Once the script is executed, you can head back to `app.portkey.ai` to view the logs for the call!
39+
Once the script is executed, you can head back to [`app.portkey.ai`](https://app.portkey.ai/login) to view the logs for the call!

0 commit comments

Comments
 (0)