mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
Update model path and documentation for cerebras API call (#8862)
This commit is contained in:
parent
884beb4342
commit
1226d318fc
1 changed files with 9 additions and 5 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue