diff --git a/fern/docs/pages/quick_start.mdx b/fern/docs/pages/quick_start.mdx
index 1f77900..0d662a0 100644
--- a/fern/docs/pages/quick_start.mdx
+++ b/fern/docs/pages/quick_start.mdx
@@ -253,7 +253,7 @@ Chat();
```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 '{ \
diff --git a/fern/docs/pages/reference/PII.mdx b/fern/docs/pages/reference/PII.mdx
index 91c9d5a..f570358 100644
--- a/fern/docs/pages/reference/PII.mdx
+++ b/fern/docs/pages/reference/PII.mdx
@@ -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)
}
@@ -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;
@@ -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();
```
```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 '{
diff --git a/fern/docs/pages/reference/chat.mdx b/fern/docs/pages/reference/chat.mdx
index 74ef815..cb2a326 100644
--- a/fern/docs/pages/reference/chat.mdx
+++ b/fern/docs/pages/reference/chat.mdx
@@ -234,7 +234,7 @@ your application.
```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 '{
diff --git a/fern/docs/pages/reference/chat_sse.mdx b/fern/docs/pages/reference/chat_sse.mdx
index c8e81ee..a33f468 100644
--- a/fern/docs/pages/reference/chat_sse.mdx
+++ b/fern/docs/pages/reference/chat_sse.mdx
@@ -250,7 +250,7 @@ method for your application.
```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 '{
diff --git a/fern/docs/pages/reference/chat_vision.mdx b/fern/docs/pages/reference/chat_vision.mdx
index 918476f..6d89ec3 100644
--- a/fern/docs/pages/reference/chat_vision.mdx
+++ b/fern/docs/pages/reference/chat_vision.mdx
@@ -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
diff --git a/fern/docs/pages/reference/completions.mdx b/fern/docs/pages/reference/completions.mdx
index d73888e..f1a7017 100644
--- a/fern/docs/pages/reference/completions.mdx
+++ b/fern/docs/pages/reference/completions.mdx
@@ -152,7 +152,7 @@ on your preference or requirements, select the appropriate method for your appli
```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 '{
diff --git a/fern/docs/pages/reference/embeddings.mdx b/fern/docs/pages/reference/embeddings.mdx
index 52ba67e..03bfc9a 100644
--- a/fern/docs/pages/reference/embeddings.mdx
+++ b/fern/docs/pages/reference/embeddings.mdx
@@ -114,20 +114,30 @@ encoded in a base64 string.
```rust
extern crate prediction_guard as pg_client;
- use pg_client::{client, embedding, models};
+ use pg_client::{client, embedding, image, models};
#[tokio::main]
async fn main() {
let pg_env = client::PgEnvironment::from_env().expect("env keys");
+ let img_str = match image::encode(
+ "https://farm4.staticflickr.com/3300/3497460990_11dfb95dd1_z.jpg".to_string(),
+ )
+ .await
+ {
+ Ok(s) => Some(s),
+ Err(_) => None,
+ };
+
let clt = client::Client::new(pg_env).expect("client value");
- // Embedding request can contain text or an image. The image should be base64 encoded.
+ // Embedding request can contain text and/or an image. The image should be base64 encoded.
let req = embedding::Request::new(
models::Model::BridgetowerLargeItmMlmItc,
- Some("Tell me a joke.".to_string()),
- IMAGE.to_string(),
- );
+ Some("skyline with a flying horse".to_string()),
+ img_str,
+ )
+ .await;
let result = clt.embedding(&req).await.expect("error from embeddings");
@@ -185,7 +195,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
diff --git a/fern/docs/pages/reference/factuality.mdx b/fern/docs/pages/reference/factuality.mdx
index 010aa25..7cb9973 100644
--- a/fern/docs/pages/reference/factuality.mdx
+++ b/fern/docs/pages/reference/factuality.mdx
@@ -147,7 +147,7 @@ for your application.
```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 '{
diff --git a/fern/docs/pages/reference/injection.mdx b/fern/docs/pages/reference/injection.mdx
index fbebab2..b6e7a5b 100644
--- a/fern/docs/pages/reference/injection.mdx
+++ b/fern/docs/pages/reference/injection.mdx
@@ -140,7 +140,7 @@ your application.
```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 '{
diff --git a/fern/docs/pages/reference/toxicity.mdx b/fern/docs/pages/reference/toxicity.mdx
index f3ca7dc..9353add 100644
--- a/fern/docs/pages/reference/toxicity.mdx
+++ b/fern/docs/pages/reference/toxicity.mdx
@@ -134,7 +134,7 @@ on your preference or requirements, select the appropriate method for your appli
```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 '{
diff --git a/fern/docs/pages/reference/translate.mdx b/fern/docs/pages/reference/translate.mdx
index 12872e1..8305ec6 100644
--- a/fern/docs/pages/reference/translate.mdx
+++ b/fern/docs/pages/reference/translate.mdx
@@ -156,7 +156,7 @@ your preference or requirements, select the appropriate method for your applicat
```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 '{
diff --git a/fern/docs/pages/sdks.mdx b/fern/docs/pages/sdks.mdx
index 28b4b87..453313f 100644
--- a/fern/docs/pages/sdks.mdx
+++ b/fern/docs/pages/sdks.mdx
@@ -27,7 +27,7 @@ to get an access token.
You can find the SDK docs and package information using this link.
-[Python SDK Docs](/docs/reference)
+[Python SDK Docs](https://predictionguard.github.io/python-client/)
#### Python Code Example