andrewyng / aisuite

Simple, unified interface to multiple Generative AI providers
MIT License
6.54k stars 548 forks source link

Add and Expose Type Hints #98

Open chasleslr opened 3 days ago

chasleslr commented 3 days ago

Summary

Add type hints to the codebase. This includes adding a py.typed file (as per PEP 561) to enable type checkers to use aisuite's type information effectively.

Why is this needed?

Proposed Solution

  1. Add Type Hints:

    • Review all functions, methods, and variables in the codebase and annotate them with appropriate type hints.
  2. Add py.typed File:

    • Include a py.typed file in the package to mark it as PEP 561-compatible.
  3. Integrate mypy:

    • Add mypy as a development dependency in the project.
    • Configure a mypy.ini file or equivalent to define type-checking rules.
    • Ensure mypy checks are part of the CI pipeline.

Additional Context

OutstandingWork commented 2 days ago

@chasleslr I would like to work on it.