Skip to content

Commit 4b8a886

Browse files
Update metadata.md
1 parent 8e57486 commit 4b8a886

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

metadata.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ All predefined keys should be of type String, with max-length as 128 characters.
66

77
## Proxy Metadata
88

9-
To include metadata in the proxy requests, you can add an `x-portkey-meta` header with a JSON string containing your metadata. Portkey will parse the JSON object and make it available for filtering.
9+
To include metadata in the proxy requests, you can add an `x-portkey-metadata` header with a JSON string containing your metadata. Portkey will parse the JSON object and make it available for filtering.
1010

1111
For the JavaScript library, use the following sample code:
1212

@@ -20,7 +20,7 @@ const configuration = new Configuration({
2020
headers: {
2121
"x-portkey-api-key": "<YOUR PORTKEY API KEY>", // Can be obtained from your account
2222
"x-portkey-mode": "proxy openai", // Instructs Portkey to proxy your request to OpenAI
23-
"x-portkey-meta": JSON.stringify({"_environment": "production", "foo": "abc", "bar": "def"}) //Enables filtering on _environment
23+
"x-portkey-metadata": JSON.stringify({"_environment": "production", "foo": "abc", "bar": "def"}) //Enables filtering on _environment
2424
}
2525
}
2626
});
@@ -44,7 +44,7 @@ response = openai.ChatCompletion.create(
4444
headers={ # Add Portkey headers for authentication and proxy mode
4545
"x-portkey-api-key": "<YOUR PORTKEY API KEY>",
4646
"x-portkey-mode": "proxy openai",
47-
"x-portkey-meta": json.dumps({"_environment": "production", "foo": "abc", "bar": "def"}) # Enables filtering on _environment
47+
"x-portkey-metadata": json.dumps({"_environment": "production", "foo": "abc", "bar": "def"}) # Enables filtering on _environment
4848
}
4949
)
5050
```

0 commit comments

Comments
 (0)