langchain/libs/community/langchain_community/chat_models
Pengcheng Liu 4cf523949a
community[patch]: Update model client to support vision model in Tong… (#21474)
- **Description:** Tongyi uses different client for chat model and
vision model. This PR chooses proper client based on model name to
support both chat model and vision model. Reference [tongyi
document](https://help.aliyun.com/zh/dashscope/developer-reference/tongyi-qianwen-vl-plus-api?spm=a2c4g.11186623.0.0.27404c9a7upm11)
for details.

```
from langchain_core.messages import HumanMessage
from langchain_community.chat_models import ChatTongyi

llm = ChatTongyi(model_name='qwen-vl-max')
image_message = {
    "image": "https://lilianweng.github.io/posts/2023-06-23-agent/agent-overview.png"
}
text_message = {
    "text": "summarize this picture",
}
message = HumanMessage(content=[text_message, image_message])
llm.invoke([message])
```

- **Issue:** None
- **Dependencies:** None
- **Twitter handle:** None
2024-05-21 11:58:27 -07:00
..
__init__.py multiple: Remove unnecessary Ruff suppression comments (#21050) 2024-04-30 17:13:48 +00:00
anthropic.py (all): update removal in deprecation warnings from 0.2 to 0.3 (#21265) 2024-05-03 14:29:36 -04:00
anyscale.py community[minor]: import fix (#20995) 2024-04-29 10:32:50 -04:00
azure_openai.py (all): update removal in deprecation warnings from 0.2 to 0.3 (#21265) 2024-05-03 14:29:36 -04:00
azureml_endpoint.py community[patch]: upgrade to recent version of mypy (#21616) 2024-05-13 14:55:07 -04:00
baichuan.py community[patch]: upgrade to recent version of mypy (#21616) 2024-05-13 14:55:07 -04:00
baidu_qianfan_endpoint.py community[patch]: upgrade to recent version of mypy (#21616) 2024-05-13 14:55:07 -04:00
bedrock.py community[patch]: Fix message formatting for Anthropic models on Amazon Bedrock (#20801) 2024-04-23 22:40:39 +00:00
cohere.py (all): update removal in deprecation warnings from 0.2 to 0.3 (#21265) 2024-05-03 14:29:36 -04:00
coze.py community[patch]: upgrade to recent version of mypy (#21616) 2024-05-13 14:55:07 -04:00
dappier.py
databricks.py community[patch]: Update documentation string in databricks chat model (#21915) 2024-05-20 14:33:57 +00:00
deepinfra.py community[patch]: upgrade to recent version of mypy (#21616) 2024-05-13 14:55:07 -04:00
edenai.py
ernie.py
everlyai.py community[minor]: import fix (#20995) 2024-04-29 10:32:50 -04:00
fake.py
fireworks.py community[patch]: upgrade to recent version of mypy (#21616) 2024-05-13 14:55:07 -04:00
friendli.py
gigachat.py community[patch]: upgrade to recent version of mypy (#21616) 2024-05-13 14:55:07 -04:00
google_palm.py
gpt_router.py
huggingface.py huggingface: init package (#21097) 2024-05-13 20:53:15 +00:00
human.py
hunyuan.py community[patch]: upgrade to recent version of mypy (#21616) 2024-05-13 14:55:07 -04:00
javelin_ai_gateway.py
jinachat.py community[patch]: upgrade to recent version of mypy (#21616) 2024-05-13 14:55:07 -04:00
kinetica.py
konko.py community[minor]: import fix (#20995) 2024-04-29 10:32:50 -04:00
litellm_router.py
litellm.py community[patch]: upgrade to recent version of mypy (#21616) 2024-05-13 14:55:07 -04:00
llama_edge.py community[patch]: upgrade to recent version of mypy (#21616) 2024-05-13 14:55:07 -04:00
maritalk.py community[patch]: Add maritalk streaming (sync and async) (#19203) 2024-04-29 21:31:14 +00:00
meta.py
minimax.py community[patch]: upgrade to recent version of mypy (#21616) 2024-05-13 14:55:07 -04:00
mlflow_ai_gateway.py
mlflow.py community[patch]: Make ChatDatabricks model supports streaming response (#19912) 2024-04-16 23:34:49 +00:00
mlx.py docs: community docstring updates (#21040) 2024-04-29 17:40:23 -04:00
moonshot.py community(patch) fix MoonshotChat moonshot_api_key is invaild for api key (#21361) 2024-05-07 08:44:30 -07:00
octoai.py community[minor]: add ChatOctoAI (#20059) 2024-04-17 03:20:56 -07:00
ollama.py community[patch]: Add "model" attribute to the payload sent to Ollama in ChatOllama (#20354) 2024-04-12 13:32:53 -04:00
openai.py Standardized openai init params (#21739) 2024-05-16 16:30:52 +00:00
pai_eas_endpoint.py community[patch]: docstrings update (#20301) 2024-04-11 16:23:27 -04:00
perplexity.py community[patch]: upgrade to recent version of mypy (#21616) 2024-05-13 14:55:07 -04:00
premai.py community[patch]: upgrade to recent version of mypy (#21616) 2024-05-13 14:55:07 -04:00
promptlayer_openai.py docs: use standard openai params (#20160) 2024-04-08 10:56:53 -05:00
solar.py community[patch]: upgrade to recent version of mypy (#21616) 2024-05-13 14:55:07 -04:00
sparkllm.py community[patch]: standardized sparkllm init args (#21633) 2024-05-20 17:11:36 -07:00
tongyi.py community[patch]: Update model client to support vision model in Tong… (#21474) 2024-05-21 11:58:27 -07:00
vertexai.py (all): update removal in deprecation warnings from 0.2 to 0.3 (#21265) 2024-05-03 14:29:36 -04:00
volcengine_maas.py
yandex.py community[patch]: docstrings update (#20301) 2024-04-11 16:23:27 -04:00
yuan2.py community[patch]: upgrade to recent version of mypy (#21616) 2024-05-13 14:55:07 -04:00
zhipuai.py community[patch]: upgrade to recent version of mypy (#21616) 2024-05-13 14:55:07 -04:00