-
Notifications
You must be signed in to change notification settings - Fork 0
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
Standardize AI Manager-Client-Model System #2
Comments
We're now using a Base class for each Manager to extend from. I'm thinking it might be good to make a Base class that each AI Type's Base Client extends from, since all clients have some shared functionality. |
The Base Client class would have methods for loading and unloading models and props for supporting those. I think it should also have a Further, the Base TTS Client class could have a Diffusers Img Client could have |
Making more progress. I've created an Further, we need to consistently implement WebSockets, on the server and client.
|
Still need to get a handle on Pydantic errors. Maybe we should mostly/only return dictionaries and only validate in the manager and API routes? That way we can catch the error and log more useful info than a mile-long stack trace that mostly isn't even my code (any way to improve fastapi traces?), e.g. log which model we were using that returned the wrong shape, anything else? |
I think we're close to having "standardized" these AIs. After squaring away the models, I think we could do some extra to make options and names a bit more consistent across AI types and clients, and we need to more completely document/validate the API. |
Taking LLM as an example.
py_api/client/llm/
) There are several Clients for using a given LLM model (TODO: Allow loading model with any supported client).gpt-*
models which are only used by the OpenAI LLM Client.py_api/client/llm_client_manager.py
) There is a Manager for handling the usage of the LLM Clients. The Manager generally just provides a common interface to interact with any LLM model that is supported. It might also do some things to help maintain compatibility between the different Clients.py_api/api/llm_api.py
) An API (actually 2: REST and WS) is exposed for LLMs. The API routes are able to interact with the Manager to get their results.py_api/models/llm/
) Pydantic models for the API and Clients are used (work in progress).Other AIs [TTS, STT, Img] (attempt to) use this general pattern.
The goal here is to improve upon this structure and consistently apply it to all AI types that we support.
The text was updated successfully, but these errors were encountered: