langchain icon indicating copy to clipboard operation
langchain copied to clipboard

Add LLM for Alibaba's Damo Academy's Tongyi Qwen API

Open wangxuqi opened this issue 1 year ago • 1 comments

  • Add langchain.llms.Tonyi for text completion, in examples into the Tonyi Text API,
  • Add system tests.

Note async completion for the Text API is not yet supported and will be included in a future PR.

Dependencies: dashscope. It will be installed manually cause it is not need by everyone.

Happy for feedback on any aspect of this PR @hwchase17 @baskaryan.

wangxuqi avatar Jul 10 '23 12:07 wangxuqi

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Jul 10, 2023 0:27am

vercel[bot] avatar Jul 10 '23 12:07 vercel[bot]

looks pretty great to me, thanks @wangxuqi!!

baskaryan avatar Jul 14 '23 05:07 baskaryan

BUG #8054

api_key invalide both of env and parameters @wangxuqi

charlescui avatar Jul 24 '23 05:07 charlescui

it seems streaming mode does not work properly ?

quantum00549 avatar Sep 20 '23 01:09 quantum00549

it seems streaming mode does not work properly ?

Yes, As the low level api had not support streaming mode when I implement this feature. I will do it as soon as possible.

wangxuqi avatar Sep 20 '23 07:09 wangxuqi

it seems streaming mode does not work properly ?

Yes, As the low level api had not support streaming mode when I implement this feature. I will do it as soon as possible.

I added the following line in the _generate() function: "if run_manager: run_manager.on_llm_new_token(stream_resp["output"]["text"])". It allows the streaming callback to be called successfully, although there are still some minor issues present.

quantum00549 avatar Sep 20 '23 07:09 quantum00549