def get_valid_models():

(docs) add docstring for
This commit is contained in:
ishaan-jaff 2023-10-30 14:05:09 -07:00
parent 4a32272bfd
commit 362e8519ef

View file

@ -4204,8 +4204,16 @@ def trim_messages(
print("Got exception while token trimming", e)
return messages
# this helper reads the .env and returns a list of supported llms for user
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:
# get keys set in .env
environ_keys = os.environ.keys()