Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

ImportError when trying to list available Language Models (LLMs) and Chat Models using langchain

$
0
0

I'm currently working on a project that involves Language Models (LLMs) and Chat Models, and I'm using the langchain library in Python to list available models. However, I'm encountering an ImportError when running the code.

Here's the code snippet I'm using:

from langchain.chat_models import list_available_modelsmodel_names = list_available_models()print(model_names)

The error message I receive is as follows:

ImportError: cannot import name 'list_available_models' from 'langchain.chat_models' (c:\Users\Edge\AppData\Local\Programs\Python\Python39\lib\site-packages\langchain\chat_models\__init__.py)

I've double-checked the library and the code, but I can't seem to find a solution to this issue. Could someone please help me understand what might be causing this ImportError and how I can resolve it?



Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>