mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-07 00:24:03 +00:00
default langfuse flush
This commit is contained in:
@@ -34,7 +34,6 @@ class LangFuseLogger:
|
||||
# print(response_obj['usage']['prompt_tokens'])
|
||||
# print(response_obj['usage']['completion_tokens'])
|
||||
|
||||
generationStartTime = datetime.now()
|
||||
self.Langfuse.generation(InitialGeneration(
|
||||
name="litellm-completion",
|
||||
startTime=start_time,
|
||||
@@ -48,7 +47,7 @@ class LangFuseLogger:
|
||||
completion_tokens=response_obj['usage']['completion_tokens']
|
||||
),
|
||||
))
|
||||
|
||||
self.Langfuse.flush()
|
||||
print_verbose(
|
||||
f"Langfuse Layer Logging - final response object: {response_obj}"
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# #### What this tests ####
|
||||
# # This tests if logging to the llmonitor integration actually works
|
||||
# # Adds the parent directory to the system path
|
||||
#### What this tests ####
|
||||
# This tests if logging to the llmonitor integration actually works
|
||||
# Adds the parent directory to the system path
|
||||
# import sys
|
||||
# import os
|
||||
|
||||
@@ -33,14 +33,13 @@
|
||||
# def test_chat_openai():
|
||||
# litellm.success_callback = ["langfuse"]
|
||||
# try:
|
||||
# response = completion(model="gpt-3.5-turbo",
|
||||
# response = completion(model="replicate/llama-2-70b-chat:2c1608e18606fad2812020dc541930f2d0495ce32eee50074220b87300bc16e1",
|
||||
# messages=[{
|
||||
# "role": "user",
|
||||
# "content": "Hi 👋 - i'm openai"
|
||||
# }])
|
||||
|
||||
# print(response)
|
||||
|
||||
# except Exception as e:
|
||||
# print(e)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user