autogen icon indicating copy to clipboard operation
autogen copied to clipboard

Enhanced Type Hints for Improved Readability and Maintainability: Addressing Type Mismatch in `query_quadrant` Return Statement

Open Hk669 opened this issue 1 year ago • 10 comments

Why are these changes needed?

  1. I've updated the type hints of the *_utils to improve code readability, maintainability, and to facilitate static type checking. This enhancement will make it easier for developers to understand the expected types of parameters and return values, reducing the likelihood of type-related errors and improving overall code quality.

  2. updated the query_quadrant in qdrant_retrieve_user_proxy_agent.py, the return statement doesn't match with the type mentioned. otherwise returns a dict, could be a problem for the developer to use query_quadrant.

Related issue number

No issue is related.

Checks

  • [ ] I've included any doc changes needed for https://microsoft.github.io/autogen/. See https://microsoft.github.io/autogen/docs/Contribute#documentation to build and test documentation locally.
  • [ ] I've added tests (if relevant) corresponding to the changes introduced in this PR.
  • [ ] I've made sure all auto checks have passed.

Hk669 avatar Apr 19 '24 17:04 Hk669

@thinkall i think we can merge this PR now? please review the PR.

@sonichi @ekzhu

Hk669 avatar Apr 28 '24 15:04 Hk669

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
10404662 Triggered Generic CLI Secret e7bd3d5372548507bfdae515b9a0c56e8bd10bc8 .github/workflows/dotnet-release.yml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

gitguardian[bot] avatar Apr 29 '24 19:04 gitguardian[bot]

Some tests failed: https://github.com/microsoft/autogen/actions/runs/8886069444/job/24398827078?pr=2452

sonichi avatar Apr 30 '24 00:04 sonichi

I'll check on them. Thanks

Hk669 avatar Apr 30 '24 02:04 Hk669

@sonichi i've made the changes.

Hk669 avatar Apr 30 '24 05:04 Hk669

Could you please fix the test failures?

yeah working on it.

Hk669 avatar Apr 30 '24 19:04 Hk669

@sonichi ive made the changes, will open a new PR for the query_qdrant, might need to change some utils too. Thanks

Hk669 avatar May 02 '24 16:05 Hk669

@sonichi i've no idea why the compression test is failing, which isn't relevant to this PR. maybe because of the previous commits? i made some changes in the test_compressible_agent, any suggestions would be greatly appreciated.

Hk669 avatar May 03 '24 05:05 Hk669

@yiranwu0 @WaelKarkoub @gagb is it time to retire compressible agent? Have we reached feature parity with the TransformMessages capability?

sonichi avatar May 05 '24 14:05 sonichi

@yiranwu0 @WaelKarkoub @gagb is it time to retire compressible agent? Have we reached feature parity with the TransformMessages capability?

@sonichi I'm working on LLMLingua support, once that goes in, we should retire compressible agent. https://github.com/microsoft/autogen/pull/2225

WaelKarkoub avatar May 05 '24 15:05 WaelKarkoub