defenseunicorns / leapfrogai

Production-ready Generative AI for local, cloud native, airgap, and edge deployments.
https://leapfrog.ai
Apache License 2.0
253 stars 29 forks source link

chore(api): Create new pattern for types with lots of functions #633

Open CollectiveUnicorn opened 3 months ago

CollectiveUnicorn commented 3 months ago

Describe what should be investigated or refactored

In the types folder and routers/openai/requests there are types. One contains general types and the other contains types with lots of functions. There needs to be a new pattern to handle utilizing types with lots of type specific functionality.

alekst23 commented 3 months ago

I think this would be a good model to follow for setting up our type library: https://github.com/openai/openai-python/blob/main/src/openai/types/__init__.py

There's a types folder with many different files and subfolders for code, and an __init__.py file that collects all the types for export.