I know there is a list_models
method in the generative-ai-python package. It appears that this method is not available in generative-ai-js
Any idea how to return the available models in a node.js based app?
I know there is a list_models
method in the generative-ai-python package. It appears that this method is not available in generative-ai-js
Any idea how to return the available models in a node.js based app?
Hi @Ruediger_Seiffert ,
Currently, the genrative-ai-js doesn’t include a function similar to the Python SDK’s list_models()
for fetching available models directly. I’ll let you know if this functionality is added in a future update to the new genai-js
SDK. Thank you!
Hi Shivam,
I am now doing it like so in Typescript:
const url: string = `https://generativelanguage.googleapis.com/v1beta/models?key=${GOOGLE_API_KEY}`
const response = await axios.get(url)