Fix image generation pre call hook call type

This commit is contained in:
John HU 2024-04-11 00:18:35 +00:00
parent 680c5e0e94
commit c9b05828ff

View file

@ -3249,8 +3249,6 @@ async def completion(
user_api_key_dict=user_api_key_dict, data=data, call_type="completion"
)
start_time = time.time()
### ROUTE THE REQUESTs ###
router_model_names = llm_router.model_names if llm_router is not None else []
# skip router if user passed their key
@ -3847,11 +3845,9 @@ async def image_generation(
### CALL HOOKS ### - modify incoming data / reject request before calling the model
data = await proxy_logging_obj.pre_call_hook(
user_api_key_dict=user_api_key_dict, data=data, call_type="embeddings"
user_api_key_dict=user_api_key_dict, data=data, call_type="image_generation"
)
start_time = time.time()
## ROUTE TO CORRECT ENDPOINT ##
# skip router if user passed their key
if "api_key" in data: