Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/genai/02_onboarding/02_setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
## Accessing your workspace
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.

## Virtual Keys
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.

## API Keys
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.

Expand All @@ -17,4 +14,7 @@ Having a "User" API key is a pre-requisite for using the [prompt playground](htt
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.
:::

## ModelCatalog
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.

You now have everything you need to send your first request to an LLM. The next section demonstrates an example.
10 changes: 6 additions & 4 deletions docs/genai/02_onboarding/03_quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,18 @@ from portkey_ai import Portkey

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

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

print(completion)
Expand Down
7 changes: 3 additions & 4 deletions docs/genai/04_how_to_guides/01_temperature.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,19 @@ from portkey_ai import Portkey

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

completion = portkey.chat.completions.create(
model="@vertexai/gemini-2.5-flash",
temperature=2.0,
messages=[
{"role": "system", "content": "You are not a helpful assistant"},
{
"role": "user",
"content": "Complete the following sentence:The sun is shining and the sky is",
},
],
model="gemini-2.5-flash-preview-04-17",
temperature=2.0, #tweak this parameter!
)

print(completion)
Expand Down
3 changes: 1 addition & 2 deletions docs/genai/04_how_to_guides/02_embeddings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ from portkey_ai import Portkey
portkey = Portkey(
base_url="https://ai-gateway.apps.cloud.rt.nyu.edu/v1/",
api_key="", # Replace with your Portkey API key
virtual_key="", # Replace with your virtual key
)

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