langchain/libs
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
..
cli cli[minor]: fix import path for two Astra DB classes in the migration json data (#21926) 2024-05-20 12:25:10 -04:00
community community[patch]: Update model client to support vision model in Tong… (#21474) 2024-05-21 11:58:27 -07:00
core core[patch]: Add unit test for RunnableGenerator for eventstream v2 (#21990) 2024-05-21 14:29:15 -04:00
experimental experimental[patch]: Pass enum only to openai in llm graph transformer (#21860) 2024-05-20 15:02:48 -07:00
langchain docs: set default anthropic model (#21988) 2024-05-21 11:01:18 -07:00
partners Revert "anthropic: set default model" (#21987) 2024-05-21 17:28:32 +00:00
standard-tests core, standard tests, partner packages: add test for model params (#21677) 2024-05-17 13:51:26 -04:00
text-splitters infra: fix CI on text-splitters (#21935) 2024-05-20 14:03:42 -07:00