Skip to content

feat: make API parameters explicit for better IDE support - #177

Merged
luk384090-cloud merged 5 commits into
mainfrom
dev/kwargs
Aug 19, 2026
Merged

feat: make API parameters explicit for better IDE support#177
luk384090-cloud merged 5 commits into
mainfrom
dev/kwargs

Conversation

@luk384090-cloud

Copy link
Copy Markdown
Collaborator

Description

[Describe what this PR does and why]

Related Issue: Fixes #[issue_number] or Relates to #[issue_number]

Security Considerations: [Check if API keys or sensitive credentials are exposed in code/logs]

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactoring

Component(s) Affected

  • Model
  • Application
  • Common
  • Documentation
  • Tests
  • CI/CD

Checklist

  • Pre-commit hooks pass
  • Tests pass locally
  • Documentation updated (if needed)
  • Ready for review

Testing

[How to test these changes]

Additional Notes

[Optional: any other context]

Comment thread dashscope/api_entities/aio_session.py Outdated
Comment thread dashscope/api_entities/aio_session.py Outdated
Comment thread dashscope/api_entities/http_request.py Outdated
Comment thread dashscope/api_entities/http_request.py Outdated
Comment thread dashscope/common/constants.py Outdated
format: str, # pylint: disable=redefined-builtin
sample_rate: int,
workspace: str = None,
# Recognition parameters

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这几个参数,是如何推导出来的,check?

kevin and others added 2 commits August 18, 2026 13:50
- Remove dead code _get_protocol_params and its unused import;
  UA-merge logic now exists in a single place (_build_api_request)
- Extract _merge_recognition_params helper to deduplicate repeated
  recognition-parameter merge blocks in Recognition (3 sites) and
  TranslationRecognizerRealtime/Chat (5 sites)
- Use Optional[...] annotations for explicit parameters introduced
  by the refactor (factory, Application.call, recognition,
  translation_recognizer, tokenization)

Behavior unchanged; all 460 unit tests pass.
@luk384090-cloud
luk384090-cloud merged commit 87d36b8 into main Aug 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants