-
Notifications
You must be signed in to change notification settings - Fork 382
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
Add dashscope application call #541
base: main
Are you sure you want to change the base?
Conversation
Please add a test in The other part looks good to me. |
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.
Does application api support streaming mode here?
Others please see inline comments
yes, it supports streaming mode, and its activation is compatible with the parameter |
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.
please see inline comments
@@ -124,6 +125,8 @@ def __init__( | |||
self, | |||
config_name: str, | |||
model_name: str = None, | |||
app_id: str = None, | |||
api_type: Literal["generation", "application"] = "generation", |
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.
Update the docstrings so that developers can know how to use this class as a model or application wrapper.
@@ -398,6 +428,32 @@ def format( | |||
`List[dict]`: | |||
The formatted messages. | |||
""" | |||
if self.api_type == "application": |
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.
What's the requirement of the application api? Is it the same with the generation API?
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.
It requires the parameter app_id
instead of model
. Besides, there are only minor differences, such as not supporting the plugins
parameter, etc.
Description
As the title says.
Checklist
Please check the following items before code is ready to be reviewed.