From a7a6544a3396680762f2727907d1b932423b9bb4 Mon Sep 17 00:00:00 2001 From: William Kennedy Date: Thu, 27 Jun 2024 17:19:35 -0400 Subject: [PATCH] updating docs for topk --- fern/docs/pages/quick_start.mdx | 3 +++ fern/docs/pages/reference/chat.mdx | 3 +++ fern/docs/pages/reference/chat_sse.mdx | 4 +++- fern/docs/pages/reference/chat_vision.mdx | 2 ++ fern/docs/pages/reference/completions.mdx | 5 ++++- fern/docs/pages/sdks.mdx | 2 ++ 6 files changed, 17 insertions(+), 2 deletions(-) diff --git a/fern/docs/pages/quick_start.mdx b/fern/docs/pages/quick_start.mdx index b2db1a9..268fd98 100644 --- a/fern/docs/pages/quick_start.mdx +++ b/fern/docs/pages/quick_start.mdx @@ -153,6 +153,7 @@ func run() error { MaxTokens: 1000, Temperature: 0.1, TopP: 0.1, + TopK: 50.0, Options: &client.ChatInputOptions{ Factuality: true, Toxicity: true, @@ -230,6 +231,7 @@ async function Chat() { maxTokens: 1000, temperature: 0.1, topP: 0.1, + topK: 50.0, options: { factuality: true, toxicity: true, @@ -271,6 +273,7 @@ curl -i -X POST https://api.predictionguard.com/chat/completions \ "max_tokens": 1000, "temperature": 1.1, "top_p": 0.1, + "top_k": 50.0, "output": { "factuality": true, "toxicity": true diff --git a/fern/docs/pages/reference/chat.mdx b/fern/docs/pages/reference/chat.mdx index 8401e02..8049566 100644 --- a/fern/docs/pages/reference/chat.mdx +++ b/fern/docs/pages/reference/chat.mdx @@ -119,6 +119,7 @@ your application. MaxTokens: 1000, Temperature: 0.1, TopP: 0.1, + TopK: 50.0, Options: &client.ChatInputOptions{ Factuality: false, Toxicity: true, @@ -211,6 +212,7 @@ your application. maxTokens: 1000, temperature: 0.1, topP: 0.1, + topK: 50.0, options: { factuality: false, toxicity: true, @@ -260,6 +262,7 @@ your application. "max_tokens": 1000, "temperature": 1.1, "top_p": 0.1, + "top_k": 50.0, "output": { "factuality": false, "toxicity": true diff --git a/fern/docs/pages/reference/chat_sse.mdx b/fern/docs/pages/reference/chat_sse.mdx index 1921c1d..124b773 100644 --- a/fern/docs/pages/reference/chat_sse.mdx +++ b/fern/docs/pages/reference/chat_sse.mdx @@ -118,7 +118,8 @@ method for your application. }, MaxTokens: 1000, Temperature: 0.1, - TopP: 0.1 + TopP: 0.1, + TopK: 50.0, } resp, err := cln.ChatSSE(ctx, input) @@ -217,6 +218,7 @@ method for your application. maxTokens: 1000, temperature: 0.1, topP: 0.1, + topK: 50.0, onMessage: function (event, err) { if (err != null) { if (err.error == 'EOF') { diff --git a/fern/docs/pages/reference/chat_vision.mdx b/fern/docs/pages/reference/chat_vision.mdx index 7e13396..413afea 100644 --- a/fern/docs/pages/reference/chat_vision.mdx +++ b/fern/docs/pages/reference/chat_vision.mdx @@ -109,6 +109,7 @@ images that are base64 encoded represented by a data uri. MaxTokens: 1000, Temperature: 0.1, TopP: 0.1, + TopK: 50.0, } resp, err := cln.ChatVision(ctx, input) @@ -173,6 +174,7 @@ images that are base64 encoded represented by a data uri. maxTokens: 1000, temperature: 0.1, topP: 0.1, + topK: 50.0, }; var [result, err] = await client.ChatVision(input); diff --git a/fern/docs/pages/reference/completions.mdx b/fern/docs/pages/reference/completions.mdx index bc2e321..ed4fbe4 100644 --- a/fern/docs/pages/reference/completions.mdx +++ b/fern/docs/pages/reference/completions.mdx @@ -81,6 +81,7 @@ on your preference or requirements, select the appropriate method for your appli MaxTokens: 1000, Temperature: 0.1, TopP: 0.1, + TopK: 50.0, } resp, err := cln.Completions(ctx, input) @@ -135,6 +136,7 @@ on your preference or requirements, select the appropriate method for your appli maxTokens: 1000, temperature: 0.1, topP: 0.1, + topK: 50.0, }; var [result, err] = await client.Completion(input); @@ -160,7 +162,8 @@ on your preference or requirements, select the appropriate method for your appli "prompt": "The best joke I know is: ", "max_tokens": 1000, "temperature": 1.1, - "top_p": 0.1 + "top_p": 0.1, + "top_k": 50.0, }' ``` diff --git a/fern/docs/pages/sdks.mdx b/fern/docs/pages/sdks.mdx index 453313f..8aa0c9a 100644 --- a/fern/docs/pages/sdks.mdx +++ b/fern/docs/pages/sdks.mdx @@ -102,6 +102,7 @@ async function Chat() { maxTokens: 1000, temperature: 0.1, topP: 0.1, + topK: 50.0, options: { factuality: true, toxicity: true, @@ -184,6 +185,7 @@ func run() error { MaxTokens: 1000, Temperature: 0.1, TopP: 0.1, + TopK: 50.0, Options: &client.ChatInputOptions{ Factuality: true, Toxicity: true,