mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
def get_valid_models():
(docs) add docstring for
This commit is contained in:
parent
4a32272bfd
commit
362e8519ef
1 changed files with 9 additions and 1 deletions
|
@ -4204,8 +4204,16 @@ def trim_messages(
|
||||||
print("Got exception while token trimming", e)
|
print("Got exception while token trimming", e)
|
||||||
return messages
|
return messages
|
||||||
|
|
||||||
# this helper reads the .env and returns a list of supported llms for user
|
|
||||||
def get_valid_models():
|
def get_valid_models():
|
||||||
|
"""
|
||||||
|
Returns a list of valid LLMs based on the set environment variables
|
||||||
|
|
||||||
|
Args:
|
||||||
|
None
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A list of valid LLMs
|
||||||
|
"""
|
||||||
try:
|
try:
|
||||||
# get keys set in .env
|
# get keys set in .env
|
||||||
environ_keys = os.environ.keys()
|
environ_keys = os.environ.keys()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue