File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 9
9
litellm .REPEATED_STREAMING_CHUNK_LIMIT = 99999999
10
10
11
11
import json
12
+ import logging
12
13
import subprocess
13
14
import time
14
15
import uuid
25
26
from .run_tool_calling_llm import run_tool_calling_llm
26
27
from .utils .convert_to_openai_messages import convert_to_openai_messages
27
28
28
- import logging
29
-
30
29
# Create or get the logger
31
- logger = logging .getLogger ('LiteLLM' )
30
+ logger = logging .getLogger ("LiteLLM" )
31
+
32
32
33
33
class SuppressDebugFilter (logging .Filter ):
34
34
def filter (self , record ):
@@ -37,6 +37,7 @@ def filter(self, record):
37
37
return False # Suppress this log message
38
38
return True # Allow all other messages
39
39
40
+
40
41
class Llm :
41
42
"""
42
43
A stateless LMC-style LLM with some helpful properties.
@@ -265,6 +266,12 @@ def run(self, messages):
265
266
266
267
pass
267
268
269
+ # If there should be a system message, there should be a system message!
270
+ # Empty system messages appear to be deleted :(
271
+ if system_message == "" :
272
+ if messages [0 ]["role" ] != "system" :
273
+ messages = [{"role" : "system" , "content" : system_message }] + messages
274
+
268
275
## Start forming the request
269
276
270
277
params = {
You can’t perform that action at this time.
0 commit comments