mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(utils.py): fix logging for text completion streaming
This commit is contained in:
parent
b4d624f332
commit
9b46412279
2 changed files with 42 additions and 1 deletions
|
@ -710,7 +710,7 @@ class CallTypes(Enum):
|
|||
aimage_generation = "aimage_generation"
|
||||
|
||||
|
||||
# Logging function -> log the exact model details + what's being sent | Non-Blocking
|
||||
# Logging function -> log the exact model details + what's being sent | Non-BlockingP
|
||||
class Logging:
|
||||
global supabaseClient, liteDebuggerClient, promptLayerLogger, weightsBiasesLogger, langsmithLogger, capture_exception, add_breadcrumb, llmonitorLogger
|
||||
|
||||
|
@ -729,6 +729,8 @@ class Logging:
|
|||
raise ValueError(
|
||||
f"Invalid call_type {call_type}. Allowed values: {allowed_values}"
|
||||
)
|
||||
if messages is not None and isinstance(messages, str):
|
||||
messages = [{"role": "user", "content": messages}] # convert text completion input to the chat completion format
|
||||
self.model = model
|
||||
self.messages = messages
|
||||
self.stream = stream
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue