Skip to content

Commit 2ea1468

Browse files
committed
docs: update codeboarding architecture documentation
## πŸ“š Architecture Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service and copied to the architecture documentation section. ### πŸ“Š Summary - Documentation files created/updated: 7 - JSON files created/updated: 8 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .md - Repository analyzed: https://github.com/CodeBoarding/friendli-python - Destination: docs/architecture/ The generated .md files have been automatically copied to the architecture documentation section and referenced in on_boarding.md. πŸ€– This commit was automatically generated by the CodeBoarding documentation update workflow.
1 parent af5799d commit 2ea1468

File tree

8 files changed

+269
-33
lines changed

8 files changed

+269
-33
lines changed
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
{
2+
"description": "This graph represents the core functionality of a system that processes user queries, generates responses using a language model, and stores interaction history. The main flow involves receiving a query, retrieving relevant information, generating a response, and then saving the interaction. Its purpose is to provide an interactive question-answering system with memory.",
3+
"components": [
4+
{
5+
"name": "Query Processor",
6+
"description": "Handles incoming user queries and prepares them for further processing.",
7+
"referenced_source_code": [
8+
{
9+
"qualified_name": "QueryHandler.process",
10+
"reference_file": "query_handler.py",
11+
"reference_start_line": null,
12+
"reference_end_line": null
13+
}
14+
],
15+
"assigned_files": [],
16+
"can_expand": true
17+
},
18+
{
19+
"name": "Information Retriever",
20+
"description": "Fetches relevant information based on the processed query from a knowledge base.",
21+
"referenced_source_code": [
22+
{
23+
"qualified_name": "KnowledgeBase.retrieve",
24+
"reference_file": "src/friendli_core/knowledge.py",
25+
"reference_start_line": 20,
26+
"reference_end_line": 115
27+
}
28+
],
29+
"assigned_files": [],
30+
"can_expand": false
31+
},
32+
{
33+
"name": "Response Generator",
34+
"description": "Utilizes a language model to generate a natural language response.",
35+
"referenced_source_code": [
36+
{
37+
"qualified_name": "LanguageModel.generate_response",
38+
"reference_file": "src/friendli_core/model.py",
39+
"reference_start_line": null,
40+
"reference_end_line": null
41+
}
42+
],
43+
"assigned_files": [],
44+
"can_expand": true
45+
},
46+
{
47+
"name": "History Logger",
48+
"description": "Stores the user query and the generated response for future reference.",
49+
"referenced_source_code": [
50+
{
51+
"qualified_name": "InteractionLogger.log",
52+
"reference_file": "src/friendli_core/utils/logger.py",
53+
"reference_start_line": null,
54+
"reference_end_line": null
55+
}
56+
],
57+
"assigned_files": [],
58+
"can_expand": false
59+
},
60+
{
61+
"name": "Unclassified",
62+
"description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)",
63+
"referenced_source_code": [],
64+
"assigned_files": [
65+
"src/friendli_core/_hooks/__init__.py",
66+
"src/friendli_core/_hooks/sdkhooks.py",
67+
"src/friendli_core/_hooks/registration.py",
68+
"src/friendli_core/_hooks/types.py"
69+
],
70+
"can_expand": false
71+
}
72+
],
73+
"components_relations": [
74+
{
75+
"relation": "sends query to",
76+
"src_name": "Query Processor",
77+
"dst_name": "Information Retriever"
78+
},
79+
{
80+
"relation": "sends info to",
81+
"src_name": "Information Retriever",
82+
"dst_name": "Response Generator"
83+
},
84+
{
85+
"relation": "sends response to",
86+
"src_name": "Response Generator",
87+
"dst_name": "History Logger"
88+
},
89+
{
90+
"relation": "receives query from",
91+
"src_name": "Information Retriever",
92+
"dst_name": "Query Processor"
93+
},
94+
{
95+
"relation": "receives info from",
96+
"src_name": "Response Generator",
97+
"dst_name": "Information Retriever"
98+
},
99+
{
100+
"relation": "receives response from",
101+
"src_name": "History Logger",
102+
"dst_name": "Response Generator"
103+
}
104+
]
105+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
```mermaid
2+
graph LR
3+
Query_Processor["Query Processor"]
4+
Information_Retriever["Information Retriever"]
5+
Response_Generator["Response Generator"]
6+
History_Logger["History Logger"]
7+
Unclassified["Unclassified"]
8+
Query_Processor -- "sends query to" --> Information_Retriever
9+
Information_Retriever -- "sends info to" --> Response_Generator
10+
Response_Generator -- "sends response to" --> History_Logger
11+
Information_Retriever -- "receives query from" --> Query_Processor
12+
Response_Generator -- "receives info from" --> Information_Retriever
13+
History_Logger -- "receives response from" --> Response_Generator
14+
```
15+
16+
[![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)
17+
18+
## Details
19+
20+
This graph represents the core functionality of a system that processes user queries, generates responses using a language model, and stores interaction history. The main flow involves receiving a query, retrieving relevant information, generating a response, and then saving the interaction. Its purpose is to provide an interactive question-answering system with memory.
21+
22+
### Query Processor
23+
Handles incoming user queries and prepares them for further processing.
24+
25+
26+
**Related Classes/Methods**:
27+
28+
- `QueryHandler.process`
29+
30+
31+
### Information Retriever
32+
Fetches relevant information based on the processed query from a knowledge base.
33+
34+
35+
**Related Classes/Methods**:
36+
37+
- <a href="https://github.com/CodeBoarding/friendli-python/blob/main/.codeboardingsrc/friendli_core/knowledge.py#L20-L115" target="_blank" rel="noopener noreferrer">`KnowledgeBase.retrieve`:20-115</a>
38+
39+
40+
### Response Generator
41+
Utilizes a language model to generate a natural language response.
42+
43+
44+
**Related Classes/Methods**:
45+
46+
- <a href="https://github.com/CodeBoarding/friendli-python/blob/main/.codeboardingsrc/friendli_core/model.py" target="_blank" rel="noopener noreferrer">`LanguageModel.generate_response`</a>
47+
48+
49+
### History Logger
50+
Stores the user query and the generated response for future reference.
51+
52+
53+
**Related Classes/Methods**:
54+
55+
- <a href="https://github.com/CodeBoarding/friendli-python/blob/main/.codeboardingsrc/friendli_core/utils/logger.py" target="_blank" rel="noopener noreferrer">`InteractionLogger.log`</a>
56+
57+
58+
### Unclassified
59+
Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)
60+
61+
62+
**Related Classes/Methods**: _None_
63+
64+
65+
66+
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)

β€Ž.codeboarding/analysis.jsonβ€Ž

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
"assigned_files": [
3434
"src/friendli/httpclient.py",
3535
"src/friendli/config.py",
36+
"src/friendli_core/__init__.py",
37+
"src/friendli_core/endpoint.py",
3638
"src/friendli_core/basesdk.py",
3739
"src/friendli_core/httpclient.py",
3840
"src/friendli_core/sdkconfiguration.py"
@@ -70,40 +72,23 @@
7072
],
7173
"assigned_files": [
7274
"src/friendli/container/completions.py",
75+
"src/friendli/container/__init__.py",
7376
"src/friendli/container/chat.py",
7477
"src/friendli/container/token.py",
75-
"src/friendli/serverless/completions.py",
76-
"src/friendli/serverless/chat.py",
77-
"src/friendli/serverless/tool_assisted_chat.py",
78-
"src/friendli/serverless/model.py",
79-
"src/friendli/serverless/token.py",
80-
"src/friendli/serverless/knowledge.py",
81-
"src/friendli/dedicated/completions.py",
82-
"src/friendli/dedicated/chat.py",
83-
"src/friendli/dedicated/endpoint.py",
84-
"src/friendli/dedicated/image.py",
85-
"src/friendli/dedicated/token.py",
86-
"src/friendli/dedicated/audio.py",
8778
"src/friendli/dataset/__init__.py",
8879
"src/friendli/dataset/dataset.py",
8980
"src/friendli/file/__init__.py",
9081
"src/friendli/file/file.py",
91-
"src/friendli_core/friendlicore_serverless_chat.py",
9282
"src/friendli_core/completions.py",
9383
"src/friendli_core/file.py",
94-
"src/friendli_core/container.py",
9584
"src/friendli_core/chat.py",
9685
"src/friendli_core/friendlicore_image.py",
9786
"src/friendli_core/friendlicore_completions.py",
98-
"src/friendli_core/endpoint.py",
99-
"src/friendli_core/friendlicore_serverless_token.py",
10087
"src/friendli_core/image.py",
101-
"src/friendli_core/model.py",
10288
"src/friendli_core/toolassistedchat.py",
10389
"src/friendli_core/dataset.py",
10490
"src/friendli_core/token.py",
10591
"src/friendli_core/friendlicore_token.py",
106-
"src/friendli_core/friendlicore_serverless_completions.py",
10792
"src/friendli_core/friendlicore_chat.py",
10893
"src/friendli_core/knowledge.py",
10994
"src/friendli_core/audio.py"
@@ -124,6 +109,7 @@
124109
"assigned_files": [
125110
"src/friendli/models.py",
126111
"src/friendli/types.py",
112+
"src/friendli_core/model.py",
127113
"src/friendli_core/models/containerdetokenizationop.py",
128114
"src/friendli_core/models/splitinfo.py",
129115
"src/friendli_core/models/dedicatedgetendpointstatusop.py",
@@ -357,11 +343,26 @@
357343
}
358344
],
359345
"assigned_files": [
360-
"src/friendli/container/__init__.py",
346+
"src/friendli/serverless/completions.py",
361347
"src/friendli/serverless/__init__.py",
348+
"src/friendli/serverless/chat.py",
349+
"src/friendli/serverless/tool_assisted_chat.py",
350+
"src/friendli/serverless/model.py",
351+
"src/friendli/serverless/token.py",
352+
"src/friendli/serverless/knowledge.py",
353+
"src/friendli/dedicated/completions.py",
362354
"src/friendli/dedicated/__init__.py",
355+
"src/friendli/dedicated/chat.py",
356+
"src/friendli/dedicated/endpoint.py",
357+
"src/friendli/dedicated/image.py",
358+
"src/friendli/dedicated/token.py",
359+
"src/friendli/dedicated/audio.py",
360+
"src/friendli_core/friendlicore_serverless_chat.py",
363361
"src/friendli_core/dedicated.py",
364-
"src/friendli_core/serverless.py"
362+
"src/friendli_core/container.py",
363+
"src/friendli_core/friendlicore_serverless_token.py",
364+
"src/friendli_core/serverless.py",
365+
"src/friendli_core/friendlicore_serverless_completions.py"
365366
],
366367
"can_expand": true
367368
},
@@ -382,15 +383,14 @@
382383
"src/friendli_core/_hooks/registration.py",
383384
"src/friendli_core/_hooks/types.py"
384385
],
385-
"can_expand": false
386+
"can_expand": true
386387
},
387388
{
388389
"name": "Unclassified",
389390
"description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)",
390391
"referenced_source_code": [],
391392
"assigned_files": [
392393
"src/friendli/utils.py",
393-
"src/friendli_core/__init__.py",
394394
"src/friendli_core/_version.py",
395395
"src/friendli_core/utils/metadata.py",
396396
"src/friendli_core/utils/__init__.py",
@@ -505,6 +505,13 @@
505505
"assigned_files": [],
506506
"can_expand": false
507507
},
508+
{
509+
"name": "Unclassified",
510+
"description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)",
511+
"referenced_source_code": [],
512+
"assigned_files": [],
513+
"can_expand": false
514+
},
508515
{
509516
"name": "Unclassified",
510517
"description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"commit_hash": "6fa0232f76cebbfe1987ee0dd5a0d0b997533a5e",
2+
"commit_hash": "af5799dbe50e9c10b483353ee8a8925f6a0aba69",
33
"code_boarding_version": "0.2.0"
44
}

β€Ž.codeboarding/overview.mdβ€Ž

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ graph LR
2121
Unclassified["Unclassified"]
2222
Unclassified["Unclassified"]
2323
Unclassified["Unclassified"]
24+
Unclassified["Unclassified"]
2425
Friendli_Client_Public_API_ -- "delegates requests to" --> SDK_Core
2526
SDK_Core -- "utilizes" --> Data_Models_Error_Handling
2627
SDK_Core -- "adapts behavior based on" --> Platform_Abstractions
@@ -32,6 +33,7 @@ graph LR
3233
click Service_Modules href "https://github.com/CodeBoarding/friendli-python/blob/main/.codeboarding/Service_Modules.md" "Details"
3334
click Data_Models_Error_Handling href "https://github.com/CodeBoarding/friendli-python/blob/main/.codeboarding/Data_Models_Error_Handling.md" "Details"
3435
click Platform_Abstractions href "https://github.com/CodeBoarding/friendli-python/blob/main/.codeboarding/Platform_Abstractions.md" "Details"
36+
click Hooks_Extensibility href "https://github.com/CodeBoarding/friendli-python/blob/main/.codeboarding/Hooks_Extensibility.md" "Details"
3537
```
3638

3739
[![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)
@@ -89,7 +91,7 @@ Provides base structures and interfaces tailored for different operational modes
8991
- `friendli_core.serverless`
9092

9193

92-
### Hooks & Extensibility
94+
### Hooks & Extensibility [[Expand]](./Hooks_Extensibility.md)
9395
Offers an extensible mechanism for injecting custom logic at various stages of the request/response lifecycle, allowing for pre-processing, post-processing, and error handling customization.
9496

9597

@@ -186,6 +188,12 @@ Component for all unclassified files and utility functions (Utility functions/Ex
186188
Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)
187189

188190

191+
**Related Classes/Methods**: _None_
192+
193+
### Unclassified
194+
Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)
195+
196+
189197
**Related Classes/Methods**: _None_
190198

191199

0 commit comments

Comments
Β (0)