Skip to content

Commit

Permalink
updating SDK docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jmansdorfer committed Oct 1, 2024
1 parent 6b5497c commit 42971e8
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 39 deletions.
20 changes: 10 additions & 10 deletions fern/docs/pages/reference/PII.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,16 @@ The output will look something like:

```json
{
"checks": [
{
"new_prompt": "Hello, my name is * and my SSN is *.",
"index": 0,
"status": "success"
}
],
"created": "1726861992",
"id": "pii-qFzipirLyeEU2QJqnUavWkIKjf30BirR",
"object": "pii_check"
"checks":[
{
"new_prompt":"Hello, my name is * and my SSN is *.",
"index":0,
"status":"success"
}
],
"created":"1726861992",
"id":"pii-qFzipirLyeEU2QJqnUavWkIKjf30BirR",
"object":"pii_check"
}
```

Expand Down
7 changes: 4 additions & 3 deletions fern/docs/pages/reference/chat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ your application.
defer cancel()

input := client.ChatInput{
Model: client.Models.Hermes2ProLlama38B,
Model: "Hermes-2-Pro-Llama-3-8B",
Messages: []client.ChatInputMessage{
{
Role: client.Roles.System,
Expand Down Expand Up @@ -178,7 +178,7 @@ your application.

async function Chat() {
const input = {
model: pg.Models.Hermes2ProLlama38B,
model: "Hermes-2-Pro-Llama-3-8B",
messages: [
{
role: pg.Roles.System,
Expand Down Expand Up @@ -280,7 +280,8 @@ The output will look something like this.
],
"created":1726862877,
"model":"Hermes-3-Llama-3.1-8B",
"object":"chat.completion"}
"object":"chat.completion"
}
```

This approach presents a straightforward way for readers to choose and apply the
Expand Down
4 changes: 2 additions & 2 deletions fern/docs/pages/reference/chat_sse.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ method for your application.
defer cancel()

input := client.ChatSSEInput{
Model: client.Models.Hermes2ProLlama38B,
Model: "Hermes-2-Pro-Llama-3-8B",
Messages: []client.ChatInputMessage{
{
Role: client.Roles.System,
Expand Down Expand Up @@ -185,7 +185,7 @@ method for your application.

async function ChatSSE() {
const input = {
model: pg.Models.Hermes2ProLlama38B,
model: "Hermes-2-Pro-Llama-3-8B",
messages: [
{
role: pg.Roles.System,
Expand Down
4 changes: 2 additions & 2 deletions fern/docs/pages/reference/completions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ on your preference or requirements, select the appropriate method for your appli
defer cancel()

input := client.CompletionInput{
Model: client.Models.Hermes2ProLlama38B,
Model: "Hermes-2-Pro-Llama-3-8B",
Prompt: "The best joke I know is: ",
MaxTokens: 1000,
Temperature: 0.1,
Expand Down Expand Up @@ -131,7 +131,7 @@ on your preference or requirements, select the appropriate method for your appli

async function Completions() {
const input = {
model: pg.Models.Hermes2ProLlama38B,
model: "Hermes-2-Pro-Llama-3-8B",
prompt: 'The best joke I know is: ',
maxTokens: 1000,
temperature: 0.1,
Expand Down
23 changes: 1 addition & 22 deletions fern/docs/pages/reference/embeddings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -228,25 +228,4 @@ The output will look something like this.
This approach presents a straightforward way for readers to choose and apply the
code example that best suits their needs for generating text completions using
either Python, Go, Rust, JS, or cURL.
curl -O 'https://farm4.staticflickr.com/3300/3497460990_11dfb95dd1_z.jpg'
base64_img="$(base64 -i 3497460990_11dfb95dd1_z.jpg)"
cat <<EOF > input.json
{
"model": "bridgetower-large-itm-mlm-itc",
"input": [
{
"text": "Tell me a joke.",
"image": "$base64_img"
}
]
}
EOF
curl -i -X POST https://stage.predictionguard.com/embeddings \
-H "Authorization: Bearer ${PREDICTIONGUARD_API_KEY}" \
-H "Content-Type: application/json" \
-d @input.json
either Python, Go, Rust, JS, or cURL.

0 comments on commit 42971e8

Please sign in to comment.