mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
Update block docs for: branching.md
This commit is contained in:
43
docs/content/platform/blocks/update/branching.md
Normal file
43
docs/content/platform/blocks/update/branching.md
Normal file
@@ -0,0 +1,43 @@
|
||||
|
||||
## Code Extraction Block
|
||||
|
||||
### What it is
|
||||
A tool that identifies and separates different types of programming code from within a text document.
|
||||
|
||||
### What it does
|
||||
This block analyzes text content and automatically detects, extracts, and categorizes code snippets based on their programming language. It can handle multiple programming languages simultaneously and preserves any non-code text.
|
||||
|
||||
### How it works
|
||||
The block searches through the input text for content enclosed in special markers (code blocks), identifies the programming language of each block, extracts the code, and organizes it by language. It also preserves any regular text that isn't code.
|
||||
|
||||
### Inputs
|
||||
- Text: The source text containing code blocks to be extracted. This could be any text that includes programming code examples, such as AI responses, technical documentation, or tutorial content.
|
||||
|
||||
### Outputs
|
||||
- HTML: Extracted HTML markup code
|
||||
- CSS: Extracted styling code
|
||||
- JavaScript: Extracted JavaScript code
|
||||
- Python: Extracted Python code
|
||||
- SQL: Extracted database query code
|
||||
- Java: Extracted Java code
|
||||
- C++: Extracted C++ code
|
||||
- C#: Extracted C# code
|
||||
- JSON: Extracted JSON data structures
|
||||
- Bash: Extracted command-line scripts
|
||||
- PHP: Extracted PHP code
|
||||
- Ruby: Extracted Ruby code
|
||||
- YAML: Extracted YAML configuration code
|
||||
- Markdown: Extracted Markdown formatting
|
||||
- TypeScript: Extracted TypeScript code
|
||||
- XML: Extracted XML markup
|
||||
- Remaining Text: Any non-code text that was in the original input
|
||||
|
||||
### Possible use cases
|
||||
1. Processing AI-generated responses that contain multiple code examples to separate the code from explanations
|
||||
2. Analyzing technical documentation to extract code samples for testing or implementation
|
||||
3. Processing programming tutorials to separate explanations from actual code examples
|
||||
4. Organizing mixed content documents into separate code files by language
|
||||
5. Creating automated documentation systems that need to handle both text and code
|
||||
6. Extracting code samples from educational materials for creating exercises or tests
|
||||
|
||||
The block is particularly useful in scenarios where you need to automatically process documents containing multiple programming languages and want to organize the code by type while preserving the contextual information.
|
||||
Reference in New Issue
Block a user