mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
bump version
This commit is contained in:
parent
b0a2e57a8a
commit
8acf959430
2 changed files with 13 additions and 1 deletions
|
@ -1411,6 +1411,18 @@ def valid_model(model):
|
||||||
except:
|
except:
|
||||||
raise InvalidRequestError(message="", model=model, llm_provider="")
|
raise InvalidRequestError(message="", model=model, llm_provider="")
|
||||||
|
|
||||||
|
# check valid api key
|
||||||
|
def check_valid_key(model: str, api_key: str):
|
||||||
|
messages = [{"role": "user", "content": "Hey, how's it going?"}]
|
||||||
|
try:
|
||||||
|
litellm.completion(model=model, messages=messages, api_key=api_key)
|
||||||
|
return True
|
||||||
|
except AuthenticationError as e:
|
||||||
|
return False
|
||||||
|
except Exception as e:
|
||||||
|
raise ValueError(str(e))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# integration helper function
|
# integration helper function
|
||||||
def modify_integration(integration_name, integration_params):
|
def modify_integration(integration_name, integration_params):
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "litellm"
|
name = "litellm"
|
||||||
version = "0.1.561"
|
version = "0.1.562"
|
||||||
description = "Library to easily interface with LLM API providers"
|
description = "Library to easily interface with LLM API providers"
|
||||||
authors = ["BerriAI"]
|
authors = ["BerriAI"]
|
||||||
license = "MIT License"
|
license = "MIT License"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue