refactor: change model name extraction to use list comprehension (#4067)
Refactor model name extraction to use list comprehension for improved readability
This commit is contained in:
parent
bffb0f129b
commit
e84148ed6d
1 changed files with 1 additions and 5 deletions
|
|
@ -28,11 +28,7 @@ response = requests.get(url)
|
|||
data = json.loads(response.text)
|
||||
|
||||
# Extract the model names into a Python list
|
||||
litellm_model_names = []
|
||||
for model, _ in data.items():
|
||||
if model != "sample_spec":
|
||||
# litellm_model_names.append(f"{details['litellm_provider']}/{model}")
|
||||
litellm_model_names.append(model)
|
||||
litellm_model_names = [model for model, _ in data.items() if model != "sample_spec"]
|
||||
|
||||
|
||||
# To store the class names that extend ToolInterface
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue