-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug fix tongyi.py to be compatible with DashScope API #11956
Conversation
Add input parameter "prompt", and update parameter name "api_key".
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
message_dicts, params = self._create_message_dicts(messages, stop) | ||
|
||
if message_dicts[-1]['role'] != 'user': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this restriction needed? Does the API error when the last message is not user
or does it return something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…1956) Current ChatTongyi is not compatible with DashScope API, which will cause error when passing api key to chat model directly. - **Description:** Update tongyi.py to be compatible with DashScope API. Specifically, update parameter name "dashscope_api_key" to "api_key". - **Issue:** None. - **Dependencies:** Nothing new, Tongyi would require DashScope as before.
Current ChatTongyi is not compatible with DashScope API, which will cause error when passing api key to chat model directly.