mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 18:24:20 +00:00
fix(utils.py): fix pre call rules
This commit is contained in:
parent
b991a35ebe
commit
2a681c1874
2 changed files with 2 additions and 2 deletions
|
@ -139,7 +139,7 @@ def test_completion_gpt4_vision():
|
|||
pass
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
# test_completion_gpt4_vision()
|
||||
test_completion_gpt4_vision()
|
||||
|
||||
def test_completion_perplexity_api():
|
||||
try:
|
||||
|
|
|
@ -1154,7 +1154,7 @@ def client(original_function):
|
|||
elif kwargs.get("messages", None):
|
||||
messages = kwargs["messages"]
|
||||
### PRE-CALL RULES ###
|
||||
rules_obj.pre_call_rules(input="".join(m["content"] for m in messages), model=model)
|
||||
rules_obj.pre_call_rules(input="".join(m["content"] for m in messages if isinstance(m["content"], str)), model=model)
|
||||
elif call_type == CallTypes.embedding.value:
|
||||
messages = args[1] if len(args) > 1 else kwargs["input"]
|
||||
stream = True if "stream" in kwargs and kwargs["stream"] == True else False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue