mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 19:54:13 +00:00
(feat) read passed api_version
This commit is contained in:
parent
d8610be012
commit
b316b49c32
1 changed files with 5 additions and 0 deletions
|
@ -2670,6 +2670,11 @@ async def chat_completion(
|
|||
except:
|
||||
data = json.loads(body_str)
|
||||
|
||||
# Azure OpenAI only: check if user passed api-version
|
||||
query_params = dict(request.query_params)
|
||||
if "api-version" in query_params:
|
||||
data["api_version"] = query_params["api-version"]
|
||||
|
||||
# Include original request and headers in the data
|
||||
data["proxy_server_request"] = {
|
||||
"url": str(request.url),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue