fix use tags as a litellm param

This commit is contained in:
Ishaan Jaff 2024-07-18 19:34:45 -07:00
parent b6e60d481e
commit 071091fd8c
2 changed files with 7 additions and 4 deletions

View file

@ -735,6 +735,7 @@ def completion(
]
litellm_params = [
"metadata",
"tags",
"acompletion",
"atext_completion",
"text_completion",
@ -3150,6 +3151,7 @@ def embedding(
"allowed_model_region",
"model_config",
"cooldown_time",
"tags",
]
default_params = openai_params + litellm_params
non_default_params = {
@ -4379,6 +4381,8 @@ def transcription(
proxy_server_request = kwargs.get("proxy_server_request", None)
model_info = kwargs.get("model_info", None)
metadata = kwargs.get("metadata", {})
tags = kwargs.pop("tags", [])
drop_params = kwargs.get("drop_params", None)
client: Optional[
Union[
@ -4551,6 +4555,7 @@ def speech(
) -> HttpxBinaryResponseContent:
model, custom_llm_provider, dynamic_api_key, api_base = get_llm_provider(model=model, custom_llm_provider=custom_llm_provider, api_base=api_base) # type: ignore
tags = kwargs.pop("tags", [])
optional_params = {}
if response_format is not None:

View file

@ -4,14 +4,12 @@ model_list:
model: openai/fake
api_key: fake-key
api_base: https://exampleopenaiendpoint-production.up.railway.app/
model_info:
tier: free # 👈 Key Change - set `tier`
tags: ["free"]
- model_name: gpt-4
litellm_params:
model: openai/gpt-4o
api_key: os.environ/OPENAI_API_KEY
model_info:
tier: paid # 👈 Key Change - set `tier`
tags: ["paid"]
general_settings:
master_key: sk-1234