forked from phoenix/litellm-mirror
Merge pull request #2945 from ushuz/hotfix
Fix image generation pre call hook call type
This commit is contained in:
commit
6749306239
1 changed files with 44 additions and 48 deletions
|
@ -3255,8 +3255,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
|
||||
|
@ -3853,11 +3851,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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue