|
| 1 | +{ |
| 2 | + "description": "The `pipelex` system leverages a flexible architecture for integrating various AI model backends. The `ModelBackendManager` serves as the central hub, abstracting the complexities of different AI providers. It interacts with standardized interfaces like `LLMInterface` for Large Language Models and `ImageGenerationInterface` for image generation, ensuring a consistent API for the rest of the system. Concrete implementations, such as `OpenAIIntegration`, provide the actual communication with external AI services, translating generic requests into provider-specific API calls and handling responses. This design allows for easy extension and interchangeability of AI backends, promoting modularity and adaptability within the `pipelex` ecosystem.", |
| 3 | + "components": [ |
| 4 | + { |
| 5 | + "name": "ModelBackendManager", |
| 6 | + "description": "This component is responsible for registering, configuring, and dynamically routing requests to various AI model backends. It acts as the central dispatcher, abstracting provider-specific details and presenting a unified interface to the rest of the `pipelex` system. It ensures that workflows can seamlessly switch between or utilize different AI providers without direct knowledge of their underlying APIs.", |
| 7 | + "referenced_source_code": [ |
| 8 | + { |
| 9 | + "qualified_name": "pipelex.cogt.model_backends.backend.InferenceBackend", |
| 10 | + "reference_file": "pipelex/cogt/model_backends/backend.py", |
| 11 | + "reference_start_line": 9, |
| 12 | + "reference_end_line": 28 |
| 13 | + } |
| 14 | + ], |
| 15 | + "assigned_files": [ |
| 16 | + "pipelex/cogt/model_backends", |
| 17 | + "pipelex/cogt/model_backends/backend.py", |
| 18 | + "pipelex/cogt/model_backends/backend_factory.py", |
| 19 | + "pipelex/cogt/model_backends/__init__.py", |
| 20 | + "pipelex/cogt/model_backends/model_constraints.py", |
| 21 | + "pipelex/cogt/model_backends/model_spec_factory.py", |
| 22 | + "pipelex/cogt/model_backends/prompting_target.py", |
| 23 | + "pipelex/cogt/model_backends/model_lists.py", |
| 24 | + "pipelex/cogt/model_backends/backend_library.py", |
| 25 | + "pipelex/cogt/model_backends/model_spec.py", |
| 26 | + "pipelex/cogt/model_backends/model_type.py", |
| 27 | + "pipelex/cogt/model_routing/routing_profile_loader.py", |
| 28 | + "pipelex/cogt/model_routing/routing_models.py", |
| 29 | + "pipelex/cogt/model_routing/__init__.py", |
| 30 | + "pipelex/cogt/model_routing/routing_profile_factory.py", |
| 31 | + "pipelex/cogt/model_routing/routing_profile.py", |
| 32 | + "pipelex/cogt/model_backends" |
| 33 | + ], |
| 34 | + "can_expand": true |
| 35 | + }, |
| 36 | + { |
| 37 | + "name": "LLMInterface", |
| 38 | + "description": "Defines a standardized API for interacting with Large Language Models. This interface specifies methods for common NLP tasks such as text generation, summarization, and embeddings, ensuring consistency across different LLM implementations.", |
| 39 | + "referenced_source_code": [ |
| 40 | + { |
| 41 | + "qualified_name": "pipelex.cogt.llm.llm_worker_abstract.LLMWorkerAbstract", |
| 42 | + "reference_file": "pipelex/cogt/llm/llm_worker_abstract.py", |
| 43 | + "reference_start_line": 18, |
| 44 | + "reference_end_line": 129 |
| 45 | + } |
| 46 | + ], |
| 47 | + "assigned_files": [ |
| 48 | + "pipelex/cogt/llm", |
| 49 | + "pipelex/cogt/llm/llm_job.py", |
| 50 | + "pipelex/cogt/llm/llm_job_components.py", |
| 51 | + "pipelex/cogt/llm/llm_prompt_template.py", |
| 52 | + "pipelex/cogt/llm/__init__.py", |
| 53 | + "pipelex/cogt/llm/llm_utils.py", |
| 54 | + "pipelex/cogt/llm/llm_worker_abstract.py", |
| 55 | + "pipelex/cogt/llm/llm_setting.py", |
| 56 | + "pipelex/cogt/llm/llm_worker_factory.py", |
| 57 | + "pipelex/cogt/llm/llm_worker_internal_abstract.py", |
| 58 | + "pipelex/cogt/llm/llm_job_factory.py", |
| 59 | + "pipelex/cogt/llm/llm_prompt_factory_abstract.py", |
| 60 | + "pipelex/cogt/llm/llm_report.py", |
| 61 | + "pipelex/cogt/llm/llm_prompt.py", |
| 62 | + "pipelex/cogt/llm/structured_output.py", |
| 63 | + "pipelex/cogt/llm/llm_prompt_template_inputs.py", |
| 64 | + "pipelex/cogt/llm" |
| 65 | + ], |
| 66 | + "can_expand": true |
| 67 | + }, |
| 68 | + { |
| 69 | + "name": "ImageGenerationInterface", |
| 70 | + "description": "Provides a standardized API for generating images based on textual prompts or other inputs. Similar to the `LLMInterface`, it ensures a consistent way for the `pipelex` system to request image generation from various providers.", |
| 71 | + "referenced_source_code": [ |
| 72 | + { |
| 73 | + "qualified_name": "pipelex.cogt.img_gen.img_gen_worker_abstract.ImgGenWorkerAbstract", |
| 74 | + "reference_file": "pipelex/cogt/img_gen/img_gen_worker_abstract.py", |
| 75 | + "reference_start_line": 14, |
| 76 | + "reference_end_line": 106 |
| 77 | + } |
| 78 | + ], |
| 79 | + "assigned_files": [ |
| 80 | + "pipelex/cogt/img_gen", |
| 81 | + "pipelex/cogt/image/prompt_image.py", |
| 82 | + "pipelex/cogt/image/__init__.py", |
| 83 | + "pipelex/cogt/image/prompt_image_factory.py", |
| 84 | + "pipelex/cogt/image/generated_image.py", |
| 85 | + "pipelex/cogt/img_gen/img_gen_job_components.py", |
| 86 | + "pipelex/cogt/img_gen/__init__.py", |
| 87 | + "pipelex/cogt/img_gen/img_gen_worker_abstract.py", |
| 88 | + "pipelex/cogt/img_gen/img_gen_job.py", |
| 89 | + "pipelex/cogt/img_gen/img_gen_worker_factory.py", |
| 90 | + "pipelex/cogt/img_gen/img_gen_setting.py", |
| 91 | + "pipelex/cogt/img_gen/img_gen_job_factory.py", |
| 92 | + "pipelex/cogt/img_gen/img_gen_prompt.py", |
| 93 | + "pipelex/cogt/img_gen" |
| 94 | + ], |
| 95 | + "can_expand": true |
| 96 | + }, |
| 97 | + { |
| 98 | + "name": "OpenAIIntegration", |
| 99 | + "description": "This component handles the direct communication and API calls to the OpenAI platform. It translates generic requests from the `LLMInterface` and `ImageGenerationInterface` into OpenAI-specific API calls and processes the responses, acting as a concrete implementation for OpenAI services.", |
| 100 | + "referenced_source_code": [ |
| 101 | + { |
| 102 | + "qualified_name": "pipelex.plugins.openai.openai_llm_worker.OpenAILLMWorker", |
| 103 | + "reference_file": "pipelex/plugins/openai/openai_llm_worker.py", |
| 104 | + "reference_start_line": 25, |
| 105 | + "reference_end_line": 148 |
| 106 | + }, |
| 107 | + { |
| 108 | + "qualified_name": "pipelex.plugins.openai.openai_img_gen_worker.OpenAIImgGenWorker", |
| 109 | + "reference_file": "pipelex/plugins/openai/openai_img_gen_worker.py", |
| 110 | + "reference_start_line": 22, |
| 111 | + "reference_end_line": 92 |
| 112 | + } |
| 113 | + ], |
| 114 | + "assigned_files": [ |
| 115 | + "pipelex/plugins/openai", |
| 116 | + "pipelex/plugins/openai/__init__.py", |
| 117 | + "pipelex/plugins/openai/openai_llm_worker.py", |
| 118 | + "pipelex/plugins/openai/openai_llms.py", |
| 119 | + "pipelex/plugins/openai/openai_factory.py", |
| 120 | + "pipelex/plugins/openai/openai_func.py", |
| 121 | + "pipelex/plugins/openai/openai_img_gen_worker.py", |
| 122 | + "pipelex/plugins/openai/openai_img_gen_factory.py", |
| 123 | + "pipelex/plugins/openai/openai_img_gen_alt_worker.py", |
| 124 | + "pipelex/plugins/openai" |
| 125 | + ], |
| 126 | + "can_expand": true |
| 127 | + }, |
| 128 | + { |
| 129 | + "name": "Unclassified", |
| 130 | + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", |
| 131 | + "referenced_source_code": [], |
| 132 | + "assigned_files": [ |
| 133 | + "pipelex/cogt", |
| 134 | + "pipelex/cogt/__init__.py", |
| 135 | + "pipelex/cogt/config_cogt.py", |
| 136 | + "pipelex/cogt/exceptions.py", |
| 137 | + "pipelex/cogt/templating/__init__.py", |
| 138 | + "pipelex/cogt/templating/template_rendering.py", |
| 139 | + "pipelex/cogt/templating/template_preprocessor.py", |
| 140 | + "pipelex/cogt/templating/template_blueprint.py", |
| 141 | + "pipelex/cogt/templating/template_category.py", |
| 142 | + "pipelex/cogt/templating/templating_style.py", |
| 143 | + "pipelex/cogt/content_generation/__init__.py", |
| 144 | + "pipelex/cogt/content_generation/content_generator_dry.py", |
| 145 | + "pipelex/cogt/content_generation/assignment_models.py", |
| 146 | + "pipelex/cogt/content_generation/llm_generate.py", |
| 147 | + "pipelex/cogt/content_generation/templating_generate.py", |
| 148 | + "pipelex/cogt/content_generation/extract_generate.py", |
| 149 | + "pipelex/cogt/content_generation/content_generator_protocol.py", |
| 150 | + "pipelex/cogt/content_generation/content_generator.py", |
| 151 | + "pipelex/cogt/content_generation/img_gen_generate.py", |
| 152 | + "pipelex/cogt" |
| 153 | + ], |
| 154 | + "can_expand": false |
| 155 | + } |
| 156 | + ], |
| 157 | + "components_relations": [ |
| 158 | + { |
| 159 | + "relation": "interacts with", |
| 160 | + "src_name": "ModelBackendManager", |
| 161 | + "dst_name": "LLMInterface" |
| 162 | + }, |
| 163 | + { |
| 164 | + "relation": "interacts with", |
| 165 | + "src_name": "ModelBackendManager", |
| 166 | + "dst_name": "ImageGenerationInterface" |
| 167 | + }, |
| 168 | + { |
| 169 | + "relation": "interacts with", |
| 170 | + "src_name": "ModelBackendManager", |
| 171 | + "dst_name": "OpenAIIntegration" |
| 172 | + }, |
| 173 | + { |
| 174 | + "relation": "dispatches to", |
| 175 | + "src_name": "LLMInterface", |
| 176 | + "dst_name": "OpenAIIntegration" |
| 177 | + }, |
| 178 | + { |
| 179 | + "relation": "dispatches to", |
| 180 | + "src_name": "ImageGenerationInterface", |
| 181 | + "dst_name": "OpenAIIntegration" |
| 182 | + }, |
| 183 | + { |
| 184 | + "relation": "implements", |
| 185 | + "src_name": "OpenAIIntegration", |
| 186 | + "dst_name": "LLMInterface" |
| 187 | + }, |
| 188 | + { |
| 189 | + "relation": "implements", |
| 190 | + "src_name": "OpenAIIntegration", |
| 191 | + "dst_name": "ImageGenerationInterface" |
| 192 | + } |
| 193 | + ] |
| 194 | +} |
0 commit comments