mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
docs(observability): use gpt-4o instead of gpt-3.5-turbo in examples
Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
This commit is contained in:
parent
ecab4713db
commit
0cda3d4ff8
17 changed files with 65 additions and 65 deletions
|
|
@ -25,7 +25,7 @@ litellm.success_callback = ["agentops"]
|
|||
|
||||
# Make your LLM calls as usual
|
||||
response = litellm.completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[{"role": "user", "content": "Hello, how are you?"}],
|
||||
)
|
||||
```
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ litellm.callbacks = ["arize"]
|
|||
|
||||
# openai call
|
||||
response = litellm.completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[
|
||||
{"role": "user", "content": "Hi 👋 - i'm openai"}
|
||||
]
|
||||
|
|
@ -108,7 +108,7 @@ litellm.callbacks = ["arize"]
|
|||
|
||||
# openai call
|
||||
response = litellm.completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[
|
||||
{"role": "user", "content": "Hi 👋 - i'm openai"}
|
||||
],
|
||||
|
|
@ -170,7 +170,7 @@ client = openai.OpenAI(
|
|||
|
||||
# request sent to model set on litellm proxy, `litellm --model`
|
||||
response = client.chat.completions.create(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages = [
|
||||
{
|
||||
"role": "user",
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ litellm.success_callback = ["athina"]
|
|||
|
||||
#openai call
|
||||
response = completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[{"role": "user", "content": "Hi 👋 - i'm openai"}]
|
||||
)
|
||||
```
|
||||
|
|
@ -56,7 +56,7 @@ You can send some additional information to Athina by using the `metadata` field
|
|||
```python
|
||||
#openai call with additional metadata
|
||||
response = completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[
|
||||
{"role": "user", "content": "Hi 👋 - i'm openai"}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ litellm.callbacks = ["braintrust"]
|
|||
|
||||
# openai call
|
||||
response = litellm.completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[
|
||||
{"role": "user", "content": "Hi 👋 - i'm openai"}
|
||||
]
|
||||
|
|
@ -43,9 +43,9 @@ BRAINTRUST_API_BASE="https://api.braintrustdata.com/v1"
|
|||
|
||||
```yaml
|
||||
model_list:
|
||||
- model_name: gpt-3.5-turbo
|
||||
- model_name: gpt-4o
|
||||
litellm_params:
|
||||
model: gpt-3.5-turbo
|
||||
model: gpt-4o
|
||||
api_key: os.environ/OPENAI_API_KEY
|
||||
|
||||
litellm_settings:
|
||||
|
|
@ -86,7 +86,7 @@ You can customize the span id, root span name and span parents in Braintrust log
|
|||
|
||||
```python
|
||||
response = litellm.completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[
|
||||
{"role": "user", "content": "Hi 👋 - i'm openai"}
|
||||
],
|
||||
|
|
@ -105,7 +105,7 @@ Note: Other `metadata` can be included here as well when using the SDK.
|
|||
|
||||
```python
|
||||
response = litellm.completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[
|
||||
{"role": "user", "content": "Hi 👋 - i'm openai"}
|
||||
],
|
||||
|
|
@ -151,7 +151,7 @@ client = openai.OpenAI(
|
|||
|
||||
# request sent to model set on litellm proxy, `litellm --model`
|
||||
response = client.chat.completions.create(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages = [
|
||||
{
|
||||
"role": "user",
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ customHandler = MyCustomHandler()
|
|||
litellm.callbacks = [customHandler]
|
||||
|
||||
## sync
|
||||
response = completion(model="gpt-3.5-turbo", messages=[{ "role": "user", "content": "Hi 👋 - i'm openai"}],
|
||||
response = completion(model="gpt-4o", messages=[{ "role": "user", "content": "Hi 👋 - i'm openai"}],
|
||||
stream=True)
|
||||
for chunk in response:
|
||||
continue
|
||||
|
|
@ -49,7 +49,7 @@ for chunk in response:
|
|||
import asyncio
|
||||
|
||||
def async completion():
|
||||
response = await acompletion(model="gpt-3.5-turbo", messages=[{ "role": "user", "content": "Hi 👋 - i'm openai"}],
|
||||
response = await acompletion(model="gpt-4o", messages=[{ "role": "user", "content": "Hi 👋 - i'm openai"}],
|
||||
stream=True)
|
||||
async for chunk in response:
|
||||
continue
|
||||
|
|
@ -125,7 +125,7 @@ from litellm import completion
|
|||
litellm.success_callback = [custom_callback]
|
||||
|
||||
response = completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[
|
||||
{
|
||||
"role": "user",
|
||||
|
|
@ -163,7 +163,7 @@ customHandler = MyCustomHandler()
|
|||
litellm.callbacks = [customHandler]
|
||||
|
||||
def async completion():
|
||||
response = await acompletion(model="gpt-3.5-turbo", messages=[{ "role": "user", "content": "Hi 👋 - i'm openai"}],
|
||||
response = await acompletion(model="gpt-4o", messages=[{ "role": "user", "content": "Hi 👋 - i'm openai"}],
|
||||
stream=True)
|
||||
async for chunk in response:
|
||||
continue
|
||||
|
|
@ -186,7 +186,7 @@ async def test_chat_openai():
|
|||
try:
|
||||
# litellm.set_verbose = True
|
||||
litellm.success_callback = [async_test_logging_fn]
|
||||
response = await litellm.acompletion(model="gpt-3.5-turbo",
|
||||
response = await litellm.acompletion(model="gpt-4o",
|
||||
messages=[{
|
||||
"role": "user",
|
||||
"content": "Hi 👋 - i'm openai"
|
||||
|
|
@ -238,7 +238,7 @@ def track_cost_callback(kwargs, completion_response, start_time, end_time):
|
|||
|
||||
litellm.success_callback = [track_cost_callback]
|
||||
|
||||
response = completion(model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Hello"}])
|
||||
response = completion(model="gpt-4o", messages=[{"role": "user", "content": "Hello"}])
|
||||
```
|
||||
|
||||
### Log Inputs to LLMs
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ We will use the `--config` to set `litellm.callbacks = ["datadog"]` this will lo
|
|||
|
||||
```yaml
|
||||
model_list:
|
||||
- model_name: gpt-3.5-turbo
|
||||
- model_name: gpt-4o
|
||||
litellm_params:
|
||||
model: gpt-3.5-turbo
|
||||
model: gpt-4o
|
||||
litellm_settings:
|
||||
callbacks: ["datadog"] # logs llm success + failure logs on datadog
|
||||
service_callback: ["datadog"] # logs redis, postgres failures on datadog
|
||||
|
|
@ -47,9 +47,9 @@ litellm_settings:
|
|||
|
||||
```yaml
|
||||
model_list:
|
||||
- model_name: gpt-3.5-turbo
|
||||
- model_name: gpt-4o
|
||||
litellm_params:
|
||||
model: gpt-3.5-turbo
|
||||
model: gpt-4o
|
||||
litellm_settings:
|
||||
callbacks: ["datadog_llm_observability"] # logs llm success logs on datadog
|
||||
```
|
||||
|
|
@ -103,7 +103,7 @@ Test Request
|
|||
curl --location 'http://0.0.0.0:4000/chat/completions' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data '{
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "gpt-4o",
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
|
|
@ -131,9 +131,9 @@ When redaction is enabled, the actual message content and response text will be
|
|||
|
||||
```yaml showLineNumbers title="config.yaml"
|
||||
model_list:
|
||||
- model_name: gpt-3.5-turbo
|
||||
- model_name: gpt-4o
|
||||
litellm_params:
|
||||
model: gpt-3.5-turbo
|
||||
model: gpt-4o
|
||||
litellm_settings:
|
||||
callbacks: ["datadog_llm_observability"] # logs llm success logs on datadog
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ litellm_settings:
|
|||
curl --location 'http://0.0.0.0:4000/chat/completions' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data '{
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "gpt-4o",
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
|
|
@ -193,9 +193,9 @@ All metrics include the following tags: `env`, `service`, `version`, `HOSTNAME`,
|
|||
|
||||
```yaml
|
||||
model_list:
|
||||
- model_name: gpt-3.5-turbo
|
||||
- model_name: gpt-4o
|
||||
litellm_params:
|
||||
model: gpt-3.5-turbo
|
||||
model: gpt-4o
|
||||
litellm_settings:
|
||||
success_callback: ["datadog_metrics"]
|
||||
failure_callback: ["datadog_metrics"]
|
||||
|
|
@ -219,7 +219,7 @@ curl --location 'http://0.0.0.0:4000/chat/completions' \
|
|||
--header 'Content-Type: application/json' \
|
||||
--header 'Authorization: Bearer sk-1234' \
|
||||
--data '{
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "gpt-4o",
|
||||
"messages": [{"role": "user", "content": "hello"}]
|
||||
}'
|
||||
```
|
||||
|
|
@ -242,9 +242,9 @@ We will use the `--config` to set `litellm.callbacks = ["datadog_cost_management
|
|||
|
||||
```yaml
|
||||
model_list:
|
||||
- model_name: gpt-3.5-turbo
|
||||
- model_name: gpt-4o
|
||||
litellm_params:
|
||||
model: gpt-3.5-turbo
|
||||
model: gpt-4o
|
||||
litellm_settings:
|
||||
callbacks: ["datadog_cost_management"]
|
||||
```
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ litellm.failure_callback = ["deepeval"]
|
|||
|
||||
try:
|
||||
response = litellm.completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[
|
||||
{"role": "user", "content": "What's the weather like in San Francisco?"}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ Helicone's AI Gateway provides [advanced functionality](https://docs.helicone.ai
|
|||
"Helicone-Retry-Enabled": "true", # Enable retry mechanism
|
||||
"helicone-retry-num": "3", # Set number of retries
|
||||
"helicone-retry-factor": "2", # Set exponential backoff factor
|
||||
"Helicone-Model-Override": "gpt-3.5-turbo-0613", # Override the model used for cost calculation
|
||||
"Helicone-Model-Override": "gpt-4o-0613", # Override the model used for cost calculation
|
||||
"Helicone-Session-Id": "session-abc-123", # Set session ID for tracking
|
||||
"Helicone-Session-Path": "parent-trace/child-trace", # Set session path for hierarchical tracking
|
||||
"Helicone-Omit-Response": "false", # Include response in logging (default behavior)
|
||||
|
|
@ -333,7 +333,7 @@ Track multi-step and agentic LLM interactions using session IDs and paths:
|
|||
Helicone-Retry-Enabled: "true"
|
||||
helicone-retry-num: "3"
|
||||
helicone-retry-factor: "2"
|
||||
Helicone-Fallbacks: '["gpt-3.5-turbo", "gpt-4"]'
|
||||
Helicone-Fallbacks: '["gpt-4o", "gpt-4"]'
|
||||
|
||||
environment_variables:
|
||||
HELICONE_API_KEY: "your-helicone-key"
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ litellm.success_callback = ["langfuse"]
|
|||
|
||||
# openai call
|
||||
response = litellm.completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[
|
||||
{"role": "user", "content": "Hi 👋 - i'm openai"}
|
||||
]
|
||||
|
|
@ -93,7 +93,7 @@ litellm.success_callback = ["langfuse"]
|
|||
|
||||
# openai call
|
||||
response = completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[
|
||||
{"role": "user", "content": "Hi 👋 - i'm openai"}
|
||||
],
|
||||
|
|
@ -129,7 +129,7 @@ litellm.success_callback = ["langfuse"]
|
|||
|
||||
# set custom langfuse trace params and generation params
|
||||
response = completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[
|
||||
{"role": "user", "content": "Hi 👋 - i'm openai"}
|
||||
],
|
||||
|
|
@ -170,7 +170,7 @@ curl --location --request POST 'http://0.0.0.0:4000/chat/completions' \
|
|||
--header 'langfuse_trace_user_id: user-id2' \
|
||||
--header 'langfuse_trace_metadata: {"key":"value"}' \
|
||||
--data '{
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "gpt-4o",
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
|
|
@ -234,7 +234,7 @@ litellm.failure_callback = ["langfuse"]
|
|||
|
||||
# Request 1 → Langfuse Project A
|
||||
response_a = completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[{"role": "user", "content": "Hello from team A"}],
|
||||
langfuse_public_key="pk-lf-project-a...",
|
||||
langfuse_secret_key="sk-lf-project-a...",
|
||||
|
|
@ -243,7 +243,7 @@ response_a = completion(
|
|||
|
||||
# Request 2 → Langfuse Project B (different project)
|
||||
response_b = completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[{"role": "user", "content": "Hello from team B"}],
|
||||
langfuse_public_key="pk-lf-project-b...",
|
||||
langfuse_secret_key="sk-lf-project-b...",
|
||||
|
|
@ -261,7 +261,7 @@ litellm.success_callback = ["langfuse"]
|
|||
litellm.failure_callback = ["langfuse"]
|
||||
|
||||
response = await acompletion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[{"role": "user", "content": "Hi"}],
|
||||
langfuse_public_key="pk-lf-...",
|
||||
langfuse_secret_key="sk-lf-...",
|
||||
|
|
@ -300,7 +300,7 @@ os.environ['OPENAI_API_KEY']="sk-..."
|
|||
litellm.success_callback = ["langfuse"]
|
||||
|
||||
chat = ChatLiteLLM(
|
||||
model="gpt-3.5-turbo"
|
||||
model="gpt-4o"
|
||||
model_kwargs={
|
||||
"metadata": {
|
||||
"trace_user_id": "user-id2", # set langfuse Trace User ID
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ litellm.callbacks = ["langsmith"]
|
|||
|
||||
# openai call
|
||||
response = litellm.completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[
|
||||
{"role": "user", "content": "Hi 👋 - i'm openai"}
|
||||
]
|
||||
|
|
@ -58,9 +58,9 @@ response = litellm.completion(
|
|||
1. Setup config.yaml
|
||||
```yaml
|
||||
model_list:
|
||||
- model_name: gpt-3.5-turbo
|
||||
- model_name: gpt-4o
|
||||
litellm_params:
|
||||
model: openai/gpt-3.5-turbo
|
||||
model: openai/gpt-4o
|
||||
api_key: os.environ/OPENAI_API_KEY
|
||||
|
||||
litellm_settings:
|
||||
|
|
@ -78,7 +78,7 @@ curl -L -X POST 'http://0.0.0.0:4000/v1/chat/completions' \
|
|||
-H 'Content-Type: application/json' \
|
||||
-H 'Authorization: Bearer sk-eWkpOhYaHiuIZV-29JDeTQ' \
|
||||
-d '{
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "gpt-4o",
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
|
|
@ -117,7 +117,7 @@ litellm.callbacks = ["langsmith"]
|
|||
litellm.langsmith_batch_size = 1 # 👈 KEY CHANGE
|
||||
|
||||
response = litellm.completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[
|
||||
{"role": "user", "content": "Hi 👋 - i'm openai"}
|
||||
]
|
||||
|
|
@ -130,9 +130,9 @@ print(response)
|
|||
1. Setup config.yaml
|
||||
```yaml
|
||||
model_list:
|
||||
- model_name: gpt-3.5-turbo
|
||||
- model_name: gpt-4o
|
||||
litellm_params:
|
||||
model: openai/gpt-3.5-turbo
|
||||
model: openai/gpt-4o
|
||||
api_key: os.environ/OPENAI_API_KEY
|
||||
|
||||
litellm_settings:
|
||||
|
|
@ -151,7 +151,7 @@ curl -L -X POST 'http://0.0.0.0:4000/v1/chat/completions' \
|
|||
-H 'Content-Type: application/json' \
|
||||
-H 'Authorization: Bearer sk-eWkpOhYaHiuIZV-29JDeTQ' \
|
||||
-d '{
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "gpt-4o",
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
|
|
@ -184,7 +184,7 @@ os.environ['OPENAI_API_KEY']=""
|
|||
litellm.success_callback = ["langsmith"]
|
||||
|
||||
response = litellm.completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[
|
||||
{"role": "user", "content": "Hi 👋 - i'm openai"}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ litellm.success_callback = ["logfire"]
|
|||
|
||||
# openai call
|
||||
response = litellm.completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[
|
||||
{"role": "user", "content": "Hi 👋 - i'm openai"}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ litellm.callbacks = ["openmeter"]
|
|||
|
||||
# openai call
|
||||
response = litellm.completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[
|
||||
{"role": "user", "content": "Hi 👋 - i'm openai"}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ litellm.callbacks = ["arize_phoenix"]
|
|||
|
||||
# OpenAI call
|
||||
response = litellm.completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[
|
||||
{"role": "user", "content": "Hi 👋 - i'm openai"}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ os.environ["OPENAI_API_KEY"], os.environ["COHERE_API_KEY"] = "", ""
|
|||
litellm.success_callback = ["promptlayer"]
|
||||
|
||||
#openai call
|
||||
response = completion(model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Hi 👋 - i'm openai"}])
|
||||
response = completion(model="gpt-4o", messages=[{"role": "user", "content": "Hi 👋 - i'm openai"}])
|
||||
|
||||
#cohere call
|
||||
response = completion(model="command-nightly", messages=[{"role": "user", "content": "Hi 👋 - i'm cohere"}])
|
||||
|
|
@ -72,7 +72,7 @@ os.environ["OPENAI_API_KEY"], os.environ["COHERE_API_KEY"] = "", ""
|
|||
litellm.success_callback = ["promptlayer"]
|
||||
|
||||
#openai call - log llm provider is openai
|
||||
response = completion(model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Hi 👋 - i'm openai"}], metadata={"provider": "openai"})
|
||||
response = completion(model="gpt-4o", messages=[{"role": "user", "content": "Hi 👋 - i'm openai"}], metadata={"provider": "openai"})
|
||||
|
||||
#cohere call - log llm provider is cohere
|
||||
response = completion(model="command-nightly", messages=[{"role": "user", "content": "Hi 👋 - i'm cohere"}], metadata={"provider": "cohere"})
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ os.environ["OPENAI_API_KEY"] = "your-openai-key"
|
|||
|
||||
# set bad key to trigger error
|
||||
api_key="bad-key"
|
||||
response = completion(model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Hey!"}], stream=True, api_key=api_key)
|
||||
response = completion(model="gpt-4o", messages=[{"role": "user", "content": "Hey!"}], stream=True, api_key=api_key)
|
||||
|
||||
print(response)
|
||||
```
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ litellm.callbacks = ["sumologic"]
|
|||
|
||||
# OpenAI call
|
||||
response = litellm.completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[
|
||||
{"role": "user", "content": "Hi 👋 - I'm testing Sumo Logic integration"}
|
||||
]
|
||||
|
|
@ -70,9 +70,9 @@ response = litellm.completion(
|
|||
|
||||
```yaml
|
||||
model_list:
|
||||
- model_name: gpt-3.5-turbo
|
||||
- model_name: gpt-4o
|
||||
litellm_params:
|
||||
model: openai/gpt-3.5-turbo
|
||||
model: openai/gpt-4o
|
||||
api_key: os.environ/OPENAI_API_KEY
|
||||
|
||||
litellm_settings:
|
||||
|
|
@ -95,7 +95,7 @@ curl -L -X POST 'http://0.0.0.0:4000/chat/completions' \
|
|||
-H 'Content-Type: application/json' \
|
||||
-H 'Authorization: Bearer sk-1234' \
|
||||
-d '{
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "gpt-4o",
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
|
|
@ -123,7 +123,7 @@ Example payload:
|
|||
{
|
||||
"id": "chatcmpl-123",
|
||||
"call_type": "litellm.completion",
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "gpt-4o",
|
||||
"messages": [
|
||||
{"role": "user", "content": "Hello"}
|
||||
],
|
||||
|
|
@ -156,9 +156,9 @@ The Sumo Logic integration uses **NDJSON (newline-delimited JSON)** format by de
|
|||
|
||||
Each log entry is sent as a separate line in the HTTP request:
|
||||
```
|
||||
{"id":"chatcmpl-1","model":"gpt-3.5-turbo","response_cost":0.0001,...}
|
||||
{"id":"chatcmpl-1","model":"gpt-4o","response_cost":0.0001,...}
|
||||
{"id":"chatcmpl-2","model":"gpt-4","response_cost":0.0003,...}
|
||||
{"id":"chatcmpl-3","model":"gpt-3.5-turbo","response_cost":0.0001,...}
|
||||
{"id":"chatcmpl-3","model":"gpt-4o","response_cost":0.0001,...}
|
||||
```
|
||||
|
||||
#### Benefits for Field Extraction Rules (FERs)
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ litellm.success_callback = ["wandb"]
|
|||
|
||||
# openai call
|
||||
response = litellm.completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[
|
||||
{"role": "user", "content": "Hi 👋 - i'm openai"}
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue