Skip to content

Commit 2720cc8

Browse files
committed
docs: update codeboarding documentation in advanced-customization
## 📚 Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service and copied to the advanced-customization section. ### 📊 Summary - Documentation files created/updated: 8 - JSON files created/updated: 9 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .md - Repository analyzed: https://github.com/Pipelex/pipelex - Destination: docs/pages/advanced-customization/ The generated .md files have been automatically copied to the advanced-customization documentation section. 🤖 This commit was automatically generated by the CodeBoarding documentation update workflow.
1 parent 33da0a0 commit 2720cc8

38 files changed

Lines changed: 2167 additions & 1389 deletions
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
{
2+
"description": "The Pipelex AI subsystem is designed around a flexible plugin-based architecture for integrating diverse AI capabilities. The `InferenceManager` serves as the central orchestrator, acting as a factory and registry for various AI worker instances. It provides a unified interface for the system to access Large Language Model (`AbstractLLMWorker`), Image Generation (`AbstractImggWorker`), and Optical Character Recognition (`AbstractOcrWorker`) functionalities. Concrete implementations of these abstract workers are provided by `PluginWorker` components, which are dynamically loaded from the `pipelex.plugins` directory. These `PluginWorker` instances adapt generic AI calls to specific third-party AI service APIs, handling API interactions, request/response translation, and service-specific error handling. Each `PluginWorker` relies on `PluginConfig` for managing sensitive configuration details like API keys and endpoints, ensuring secure and centralized credential management. Additionally, `PluginWorker` components interact with the `LLMModelLibrary` to retrieve model-specific information and capabilities, enabling dynamic model selection and configuration. This design promotes extensibility, allowing new AI services to be integrated by simply adding new plugin implementations.",
3+
"components": [
4+
{
5+
"name": "InferenceManager",
6+
"description": "Acts as a centralized factory and registry for all AI worker instances (LLM, Image Generation, OCR). It provides a unified interface for the rest of the system to obtain AI capabilities, managing the lifecycle and configuration of these workers.",
7+
"referenced_source_code": [
8+
{
9+
"qualified_name": "pipelex.cogt.inference.inference_manager.InferenceManager",
10+
"reference_file": "/home/ubuntu/CodeBoarding/repo/pipelex/pipelex/cogt/inference/inference_manager.py",
11+
"reference_start_line": 23,
12+
"reference_end_line": 186
13+
}
14+
],
15+
"can_expand": true
16+
},
17+
{
18+
"name": "AbstractLLMWorker",
19+
"description": "Defines the abstract contract for all Large Language Model (LLM) operations, including methods for generating text (`gen_text`) and structured objects (`gen_object`). This ensures a consistent interface across different LLM providers.",
20+
"referenced_source_code": [
21+
{
22+
"qualified_name": "pipelex.cogt.llm.llm_worker_abstract.AbstractLLMWorker",
23+
"reference_file": "/home/ubuntu/CodeBoarding/repo/pipelex/pipelex/cogt/llm/llm_worker_abstract.py",
24+
"reference_start_line": 0,
25+
"reference_end_line": 0
26+
}
27+
],
28+
"can_expand": true
29+
},
30+
{
31+
"name": "AbstractImggWorker",
32+
"description": "Defines the abstract contract for all Image Generation (Imgg) operations, including methods for generating single images (`gen_image`) and lists of images (`gen_image_list`).",
33+
"referenced_source_code": [
34+
{
35+
"qualified_name": "pipelex.cogt.imgg.imgg_worker_abstract.AbstractImggWorker",
36+
"reference_file": "/home/ubuntu/CodeBoarding/repo/pipelex/pipelex/cogt/imgg/imgg_worker_abstract.py",
37+
"reference_start_line": 0,
38+
"reference_end_line": 0
39+
}
40+
],
41+
"can_expand": true
42+
},
43+
{
44+
"name": "AbstractOcrWorker",
45+
"description": "Defines the abstract contract for all Optical Character Recognition (OCR) operations, specifically for extracting text from pages (`ocr_extract_pages`).",
46+
"referenced_source_code": [
47+
{
48+
"qualified_name": "pipelex.cogt.ocr.ocr_worker_abstract.AbstractOcrWorker",
49+
"reference_file": "/home/ubuntu/CodeBoarding/repo/pipelex/pipelex/cogt/ocr/ocr_worker_abstract.py",
50+
"reference_start_line": 0,
51+
"reference_end_line": 0
52+
}
53+
],
54+
"can_expand": true
55+
},
56+
{
57+
"name": "PluginWorker",
58+
"description": "Provides concrete implementations of the `AbstractWorker` interfaces (LLM, Imgg, OCR). These components adapt Pipelex's generic worker calls to the specific API requirements of various third-party AI services (e.g., Anthropic, OpenAI, Google Vertex). They handle API calls, request/response translation, and service-specific error handling.",
59+
"referenced_source_code": [
60+
{
61+
"qualified_name": "pipelex.plugins.PluginWorker",
62+
"reference_file": "/home/ubuntu/CodeBoarding/repo/pipelex/pipelex/plugins",
63+
"reference_start_line": 0,
64+
"reference_end_line": 0
65+
}
66+
],
67+
"can_expand": true
68+
},
69+
{
70+
"name": "PluginConfig",
71+
"description": "Manages and provides configuration details, including API keys, endpoints, and region settings, for specific third-party AI services. It acts as a secure and centralized store for sensitive credentials.",
72+
"referenced_source_code": [
73+
{
74+
"qualified_name": "pipelex.plugins.PluginConfig",
75+
"reference_file": "/home/ubuntu/CodeBoarding/repo/pipelex/pipelex/plugins",
76+
"reference_start_line": 0,
77+
"reference_end_line": 0
78+
}
79+
],
80+
"can_expand": true
81+
},
82+
{
83+
"name": "LLMModelLibrary",
84+
"description": "Manages a catalog of available LLM models, including their definitions, versions, and capabilities. It provides a mechanism to retrieve model-specific details and properties.",
85+
"referenced_source_code": [
86+
{
87+
"qualified_name": "pipelex.cogt.llm.llm_models.llm_model_library.LLMModelLibrary",
88+
"reference_file": "/home/ubuntu/CodeBoarding/repo/pipelex/pipelex/cogt/llm/llm_models/llm_model_library.py",
89+
"reference_start_line": 33,
90+
"reference_end_line": 158
91+
}
92+
],
93+
"can_expand": true
94+
}
95+
],
96+
"components_relations": [
97+
{
98+
"relation": "manages and provides instances of",
99+
"src_name": "InferenceManager",
100+
"dst_name": "AbstractLLMWorker"
101+
},
102+
{
103+
"relation": "manages and provides instances of",
104+
"src_name": "InferenceManager",
105+
"dst_name": "AbstractImggWorker"
106+
},
107+
{
108+
"relation": "manages and provides instances of",
109+
"src_name": "InferenceManager",
110+
"dst_name": "AbstractOcrWorker"
111+
},
112+
{
113+
"relation": "instantiates",
114+
"src_name": "InferenceManager",
115+
"dst_name": "PluginWorker"
116+
},
117+
{
118+
"relation": "implements",
119+
"src_name": "PluginWorker",
120+
"dst_name": "AbstractLLMWorker"
121+
},
122+
{
123+
"relation": "implements",
124+
"src_name": "PluginWorker",
125+
"dst_name": "AbstractImggWorker"
126+
},
127+
{
128+
"relation": "implements",
129+
"src_name": "PluginWorker",
130+
"dst_name": "AbstractOcrWorker"
131+
},
132+
{
133+
"relation": "uses",
134+
"src_name": "PluginWorker",
135+
"dst_name": "PluginConfig"
136+
},
137+
{
138+
"relation": "queries",
139+
"src_name": "PluginWorker",
140+
"dst_name": "LLMModelLibrary"
141+
},
142+
{
143+
"relation": "provides configuration to",
144+
"src_name": "PluginConfig",
145+
"dst_name": "PluginWorker"
146+
},
147+
{
148+
"relation": "provides model information to",
149+
"src_name": "LLMModelLibrary",
150+
"dst_name": "PluginWorker"
151+
}
152+
]
153+
}
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
```mermaid
2+
graph LR
3+
InferenceManager["InferenceManager"]
4+
AbstractLLMWorker["AbstractLLMWorker"]
5+
AbstractImggWorker["AbstractImggWorker"]
6+
AbstractOcrWorker["AbstractOcrWorker"]
7+
PluginWorker["PluginWorker"]
8+
PluginConfig["PluginConfig"]
9+
LLMModelLibrary["LLMModelLibrary"]
10+
InferenceManager -- "manages and provides instances of" --> AbstractLLMWorker
11+
InferenceManager -- "manages and provides instances of" --> AbstractImggWorker
12+
InferenceManager -- "manages and provides instances of" --> AbstractOcrWorker
13+
InferenceManager -- "instantiates" --> PluginWorker
14+
PluginWorker -- "implements" --> AbstractLLMWorker
15+
PluginWorker -- "implements" --> AbstractImggWorker
16+
PluginWorker -- "implements" --> AbstractOcrWorker
17+
PluginWorker -- "uses" --> PluginConfig
18+
PluginWorker -- "queries" --> LLMModelLibrary
19+
PluginConfig -- "provides configuration to" --> PluginWorker
20+
LLMModelLibrary -- "provides model information to" --> PluginWorker
21+
```
22+
23+
[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/CodeBoarding)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/diagrams)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org)
24+
25+
## Details
26+
27+
The Pipelex AI subsystem is designed around a flexible plugin-based architecture for integrating diverse AI capabilities. The `InferenceManager` serves as the central orchestrator, acting as a factory and registry for various AI worker instances. It provides a unified interface for the system to access Large Language Model (`AbstractLLMWorker`), Image Generation (`AbstractImggWorker`), and Optical Character Recognition (`AbstractOcrWorker`) functionalities. Concrete implementations of these abstract workers are provided by `PluginWorker` components, which are dynamically loaded from the `pipelex.plugins` directory. These `PluginWorker` instances adapt generic AI calls to specific third-party AI service APIs, handling API interactions, request/response translation, and service-specific error handling. Each `PluginWorker` relies on `PluginConfig` for managing sensitive configuration details like API keys and endpoints, ensuring secure and centralized credential management. Additionally, `PluginWorker` components interact with the `LLMModelLibrary` to retrieve model-specific information and capabilities, enabling dynamic model selection and configuration. This design promotes extensibility, allowing new AI services to be integrated by simply adding new plugin implementations.
28+
29+
### InferenceManager
30+
Acts as a centralized factory and registry for all AI worker instances (LLM, Image Generation, OCR). It provides a unified interface for the rest of the system to obtain AI capabilities, managing the lifecycle and configuration of these workers.
31+
32+
33+
**Related Classes/Methods**:
34+
35+
- <a href="https://github.com/Pipelex/pipelex/blob/main/pipelex/cogt/inference/inference_manager.py#L23-L186" target="_blank" rel="noopener noreferrer">`pipelex.cogt.inference.inference_manager.InferenceManager`:23-186</a>
36+
37+
38+
### AbstractLLMWorker
39+
Defines the abstract contract for all Large Language Model (LLM) operations, including methods for generating text (`gen_text`) and structured objects (`gen_object`). This ensures a consistent interface across different LLM providers.
40+
41+
42+
**Related Classes/Methods**:
43+
44+
- <a href="https://github.com/Pipelex/pipelex/blob/main/pipelex/cogt/llm/llm_worker_abstract.py" target="_blank" rel="noopener noreferrer">`pipelex.cogt.llm.llm_worker_abstract.AbstractLLMWorker`</a>
45+
46+
47+
### AbstractImggWorker
48+
Defines the abstract contract for all Image Generation (Imgg) operations, including methods for generating single images (`gen_image`) and lists of images (`gen_image_list`).
49+
50+
51+
**Related Classes/Methods**:
52+
53+
- <a href="https://github.com/Pipelex/pipelex/blob/main/pipelex/cogt/imgg/imgg_worker_abstract.py" target="_blank" rel="noopener noreferrer">`pipelex.cogt.imgg.imgg_worker_abstract.AbstractImggWorker`</a>
54+
55+
56+
### AbstractOcrWorker
57+
Defines the abstract contract for all Optical Character Recognition (OCR) operations, specifically for extracting text from pages (`ocr_extract_pages`).
58+
59+
60+
**Related Classes/Methods**:
61+
62+
- <a href="https://github.com/Pipelex/pipelex/blob/main/pipelex/cogt/ocr/ocr_worker_abstract.py" target="_blank" rel="noopener noreferrer">`pipelex.cogt.ocr.ocr_worker_abstract.AbstractOcrWorker`</a>
63+
64+
65+
### PluginWorker
66+
Provides concrete implementations of the `AbstractWorker` interfaces (LLM, Imgg, OCR). These components adapt Pipelex's generic worker calls to the specific API requirements of various third-party AI services (e.g., Anthropic, OpenAI, Google Vertex). They handle API calls, request/response translation, and service-specific error handling.
67+
68+
69+
**Related Classes/Methods**:
70+
71+
- <a href="https://github.com/Pipelex/pipelex/blob/main/pipelex/plugins" target="_blank" rel="noopener noreferrer">`pipelex.plugins.PluginWorker`</a>
72+
73+
74+
### PluginConfig
75+
Manages and provides configuration details, including API keys, endpoints, and region settings, for specific third-party AI services. It acts as a secure and centralized store for sensitive credentials.
76+
77+
78+
**Related Classes/Methods**:
79+
80+
- <a href="https://github.com/Pipelex/pipelex/blob/main/pipelex/plugins" target="_blank" rel="noopener noreferrer">`pipelex.plugins.PluginConfig`</a>
81+
82+
83+
### LLMModelLibrary
84+
Manages a catalog of available LLM models, including their definitions, versions, and capabilities. It provides a mechanism to retrieve model-specific details and properties.
85+
86+
87+
**Related Classes/Methods**:
88+
89+
- <a href="https://github.com/Pipelex/pipelex/blob/main/pipelex/cogt/llm/llm_models/llm_model_library.py#L33-L158" target="_blank" rel="noopener noreferrer">`pipelex.cogt.llm.llm_models.llm_model_library.LLMModelLibrary`:33-158</a>
90+
91+
92+
93+
94+
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)

.codeboarding/AI_Service_Integration_Layer.json

Lines changed: 0 additions & 19 deletions
This file was deleted.

.codeboarding/AI_Service_Integration_Layer.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)