in python/models.py [0:0]
def test_models_list(self):
# [START models_list]
from google import genai
client = genai.Client()
print("List of models that support generateContent:\n")
for m in client.models.list():
for action in m.supported_actions:
if action == "generateContent":
print(m.name)
print("List of models that support embedContent:\n")
for m in client.models.list():
for action in m.supported_actions:
if action == "embedContent":
print(m.name)