from aiconfig import AIConfigRuntime, ModelParserRegistry #, DalleImageGenerationParser from aiconfig_extension_gemini import GeminiModelParser # Example of how users can register model parsers for use in the GradioWorkbook # The implementation looks for a parsers_path (model_parsers.py by default) which # should include a module with a register_model_parsers function. # Here we are registering all the local HuggingFace model parsers as an example def register_model_parsers() -> None: # dalle_image_generation_models = [ # "dall-e-2", # "dall-e-3", # # ] # for model in dalle_image_generation_models: # ModelParserRegistry.register_model_parser( # DalleImageGenerationParser(model) # ) ModelParserRegistry.register_model_parser( GeminiModelParser("gemini-pro"), ["gemini-pro"] )