Skip to content

Commit

Permalink
fixing docs for pii and curl
Browse files Browse the repository at this point in the history
  • Loading branch information
ardan-bkennedy committed Jun 22, 2024
1 parent aab0ccb commit 721918b
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion fern/docs/pages/quick_start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ Chat();

<CodeBlock title="cURL">
```bash
curl -il -X POST https://api.predictionguard.com/chat/completions \
curl -i -X POST https://api.predictionguard.com/chat/completions \
-H "x-api-key: ${PGKEY}" \
-H "Content-Type: application/json" \
-d '{ \
Expand Down
10 changes: 5 additions & 5 deletions fern/docs/pages/reference/PII.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ your preference or requirements, select the appropriate method for your applicat

prompt := "Hello, my name is John Doe and my SSN is 111-22-3333."

resp, err := cln.ReplacePI(ctx, prompt, client.ReplaceMethods.Mask)
resp, err := cln.ReplacePII(ctx, prompt, client.ReplaceMethods.Mask)
if err != nil {
return fmt.Errorf("ERROR: %w", err)
}
Expand Down Expand Up @@ -124,11 +124,11 @@ your preference or requirements, select the appropriate method for your applicat

const client = new pg.Client('https://api.predictionguard.com', process.env.PGKEY);

async function ReplacePI() {
async function ReplacePII() {
const replaceMethod = pg.ReplaceMethods.Mask;
const prompt = `Hello, my name is John Doe and my SSN is 111-22-3333.`;

var [result, err] = await client.ReplacePI(replaceMethod, prompt);
var [result, err] = await client.ReplacePII(replaceMethod, prompt);
if (err != null) {
console.log('ERROR:' + err.error);
return;
Expand All @@ -137,13 +137,13 @@ your preference or requirements, select the appropriate method for your applicat
console.log('RESULT:' + result.checks[0].new_prompt);
}

ReplacePI();
ReplacePII();
```
</CodeBlock>

<CodeBlock title="cURL">
```bash
curl -X POST https://api.predictionguard.com/PII \
curl -i -X POST https://api.predictionguard.com/PII \
-H "x-api-key: ${PGKEY}" \
-H "Content-Type: application/json" \
-d '{
Expand Down
2 changes: 1 addition & 1 deletion fern/docs/pages/reference/chat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ your application.

<CodeBlock title="cURL">
```bash
curl -il -X POST https://api.predictionguard.com/chat/completions \
curl -i -X POST https://api.predictionguard.com/chat/completions \
-H "x-api-key: ${PGKEY}" \
-H "Content-Type: application/json" \
-d '{
Expand Down
2 changes: 1 addition & 1 deletion fern/docs/pages/reference/chat_sse.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ method for your application.

<CodeBlock title="cURL">
```bash
curl -il -X POST https://api.predictionguard.com/chat/completions \
curl -i -X POST https://api.predictionguard.com/chat/completions \
-H "x-api-key: ${PGKEY}" \
-H "Content-Type: application/json" \
-d '{
Expand Down
2 changes: 1 addition & 1 deletion fern/docs/pages/reference/chat_vision.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ images that are base64 encoded represented by a data uri.
}
EOF

curl -il -X POST https://api.predictionguard.com/chat/completions \
curl -i -X POST https://api.predictionguard.com/chat/completions \
-H "x-api-key: ${PGKEY}" \
-H "Content-Type: application/json" \
-d @input.json
Expand Down
2 changes: 1 addition & 1 deletion fern/docs/pages/reference/completions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ on your preference or requirements, select the appropriate method for your appli

<CodeBlock title="cURL">
```bash
curl -il -X POST https://api.predictionguard.com/completions \
curl -i -X POST https://api.predictionguard.com/completions \
-H "x-api-key: ${PGKEY}" \
-H "Content-Type: application/json" \
-d '{
Expand Down
2 changes: 1 addition & 1 deletion fern/docs/pages/reference/embeddings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ encoded in a base64 string.
}
EOF
curl -il -X POST https://api.predictionguard.com/embeddings \
curl -i -X POST https://api.predictionguard.com/embeddings \
-H "x-api-key: ${PGKEY}" \
-H "Content-Type: application/json" \
-d @input.json
Expand Down
2 changes: 1 addition & 1 deletion fern/docs/pages/reference/factuality.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ for your application.

<CodeBlock title="cURL">
```bash
curl -X POST https://api.predictionguard.com/factuality \
curl -i -X POST https://api.predictionguard.com/factuality \
-H "x-api-key: ${PGKEY}" \
-H "Content-Type: application/json" \
-d '{
Expand Down
2 changes: 1 addition & 1 deletion fern/docs/pages/reference/injection.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ your application.

<CodeBlock title="cURL">
```bash
curl -X POST https://api.predictionguard.com/injection \
curl -i -X POST https://api.predictionguard.com/injection \
-H "x-api-key: ${PGKEY}" \
-H "Content-Type: application/json" \
-d '{
Expand Down
2 changes: 1 addition & 1 deletion fern/docs/pages/reference/toxicity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ on your preference or requirements, select the appropriate method for your appli

<CodeBlock title="cURL">
```bash
curl -X POST https://api.predictionguard.com/toxicity \
curl -i -X POST https://api.predictionguard.com/toxicity \
-H "x-api-key: ${PGKEY}" \
-H "Content-Type: application/json" \
-d '{
Expand Down
2 changes: 1 addition & 1 deletion fern/docs/pages/reference/translate.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ your preference or requirements, select the appropriate method for your applicat

<CodeBlock title="cURL">
```bash
curl -X POST https://api.predictionguard.com/translate \
curl -i -X POST https://api.predictionguard.com/translate \
-H "x-api-key: ${PGKEY}" \
-H "Content-Type: application/json" \
-d '{
Expand Down

0 comments on commit 721918b

Please sign in to comment.