Skip to content

Commit c2f1f3a

Browse files
authored
Merge pull request #162 from NYU-RTS/genai_virtual_keys_are_dead
virtual keys are dead!
2 parents 46a8939 + b727511 commit c2f1f3a

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

docs/genai/02_onboarding/02_setup.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
## Accessing your workspace
44
Login to Portkey at [`app.portkey.ai`](https://app.portkey.ai/login) with the `Single-sign-on` option using your NYU NetID. Once you're in, you'll be placed in the "Shared Workspace" by default. You can navigate to your workspace by selecting it from the workspace drop-down list from the top of the left sidebar.
55

6-
## Virtual Keys
7-
As workspace member you will be able to access virtual keys by clicking on the "Virtual Keys" item on the left sidebar in the "AI Gateway" section. You will have access to virtual keys added by the RTS team, but as an end-user, you will not have the ability to add them.
8-
96
## API Keys
107
The first task we recommend that you perform is to create a "User" API key for yourself. Click on the "API Keys" item on the left sidebar. Once you hit the create button you'd be able to choose the type (User/Service), optional items like config and metadata. In addition, you are free to choose as many or as few permissions you'd provide the API key.
118

@@ -17,4 +14,7 @@ Having a "User" API key is a pre-requisite for using the [prompt playground](htt
1714
The only difference between user and service keys is that the logs with user key will have the NetID of the user as part of the metadata while the services will not. We recommend service keys to be used when you're creating end user applications like chatbots and stick to user keys otherwise.
1815
:::
1916

17+
## ModelCatalog
18+
You can view the LLMs you have access to via the ModelCatalog item on the left sidebar. Once in the ModelCtalog panel, you'll be able to view a list of providers and models. Each provider facilitates access to one or more LLMs and has a budget limit that can be increased upon request.
19+
2020
You now have everything you need to send your first request to an LLM. The next section demonstrates an example.

docs/genai/02_onboarding/03_quickstart.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,18 @@ from portkey_ai import Portkey
2121

2222
portkey = Portkey(
2323
base_url="https://ai-gateway.apps.cloud.rt.nyu.edu/v1/",
24-
api_key="", # Replace with your Portkey API key
25-
virtual_key="", # Replace with your virtual key
24+
api_key="", # Replace with your API key!
2625
)
2726

2827
completion = portkey.chat.completions.create(
28+
model="@vertexai/gemini-2.5-flash", # Replace with a model available to you!
2929
messages=[
3030
{"role": "system", "content": "You are not a helpful assistant"},
31-
{"role": "user", "content": "Say this is a test"},
31+
{
32+
"role": "user",
33+
"content": "Complete the following sentence:The sun is shining and the sky is",
34+
},
3235
],
33-
model="", # Replace with the LLM model you'd like to use
3436
)
3537

3638
print(completion)

docs/genai/04_how_to_guides/01_temperature.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,19 @@ from portkey_ai import Portkey
1616

1717
portkey = Portkey(
1818
base_url="https://ai-gateway.apps.cloud.rt.nyu.edu/v1/",
19-
api_key="", # Replace with your Portkey API key
20-
virtual_key="", # Replace with your virtual key
19+
api_key="", # Replace with your API key!
2120
)
2221

2322
completion = portkey.chat.completions.create(
23+
model="@vertexai/gemini-2.5-flash",
24+
temperature=2.0,
2425
messages=[
2526
{"role": "system", "content": "You are not a helpful assistant"},
2627
{
2728
"role": "user",
2829
"content": "Complete the following sentence:The sun is shining and the sky is",
2930
},
3031
],
31-
model="gemini-2.5-flash-preview-04-17",
32-
temperature=2.0, #tweak this parameter!
3332
)
3433

3534
print(completion)

docs/genai/04_how_to_guides/02_embeddings.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,10 @@ from portkey_ai import Portkey
2323
portkey = Portkey(
2424
base_url="https://ai-gateway.apps.cloud.rt.nyu.edu/v1/",
2525
api_key="", # Replace with your Portkey API key
26-
virtual_key="", # Replace with your virtual key
2726
)
2827

2928
response = portkey.embeddings.create(
30-
model="text-embedding-3-small",
29+
model="@AI-Provider/text-embedding-3-small", # Replace with AI Provider from your workspace!
3130
input="GenAI can be used for research.",
3231
encoding_format="float",
3332
dimensions=32,

0 commit comments

Comments
 (0)