From 1226d318fcb9c5a12af1fc12fb90c31cbe8eccc8 Mon Sep 17 00:00:00 2001 From: Mehdi <16926558+marscod@users.noreply.github.com> Date: Thu, 27 Feb 2025 20:23:03 -0800 Subject: [PATCH] Update model path and documentation for cerebras API call (#8862) --- docs/my-website/docs/providers/cerebras.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/my-website/docs/providers/cerebras.md b/docs/my-website/docs/providers/cerebras.md index 4fabeb31cbc..33bef5e1079 100644 --- a/docs/my-website/docs/providers/cerebras.md +++ b/docs/my-website/docs/providers/cerebras.md @@ -23,14 +23,16 @@ import os os.environ['CEREBRAS_API_KEY'] = "" response = completion( - model="cerebras/meta/llama3-70b-instruct", + model="cerebras/llama3-70b-instruct", messages=[ { "role": "user", - "content": "What's the weather like in Boston today in Fahrenheit?", + "content": "What's the weather like in Boston today in Fahrenheit? (Write in JSON)", } ], max_tokens=10, + + # The prompt should include JSON if 'json_object' is selected; otherwise, you will get error code 400. response_format={ "type": "json_object" }, seed=123, stop=["\n\n"], @@ -50,16 +52,18 @@ import os os.environ['CEREBRAS_API_KEY'] = "" response = completion( - model="cerebras/meta/llama3-70b-instruct", + model="cerebras/llama3-70b-instruct", messages=[ { "role": "user", - "content": "What's the weather like in Boston today in Fahrenheit?", + "content": "What's the weather like in Boston today in Fahrenheit? (Write in JSON)", } ], stream=True, max_tokens=10, - response_format={ "type": "json_object" }, + + # The prompt should include JSON if 'json_object' is selected; otherwise, you will get error code 400. + response_format={ "type": "json_object" }, seed=123, stop=["\n\n"], temperature=0.2,