fix(main.py): fix mock completion response

This commit is contained in:
Krrish Dholakia 2024-04-30 19:30:18 -07:00
parent b4ec16fd5f
commit 885eb4584a

View file

@ -360,7 +360,7 @@ def mock_completion(
model: str,
messages: List,
stream: Optional[bool] = False,
mock_response: str = "This is a mock request",
mock_response: Union[str, Exception] = "This is a mock request",
logging=None,
**kwargs,
):
@ -388,6 +388,7 @@ def mock_completion(
"""
try:
## LOGGING
if logging is not None:
logging.pre_call(
input=messages,
api_key="mock-key",