User Tools

Site Tools


ai_dimensional_connection

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ai_dimensional_connection [2025/05/26 14:17] – [Class Structure] eagleeyenebulaai_dimensional_connection [2025/05/26 14:29] (current) – [Best Practices] eagleeyenebula
Line 61: Line 61:
 **Functionality:** **Functionality:**
  
-   1. **Predefined Dimensions**:+   **Predefined Dimensions**:
  
 The dictionary includes rich narrative-based outputs for each of the defined dimensions. The dictionary includes rich narrative-based outputs for each of the defined dimensions.
  
-   2. **Fallback for Undefined Dimensions**:+   **Fallback for Undefined Dimensions**:
  
 Queries outside the predefined dictionary result in the default fallback text: **"She reaches for the unknown."** Queries outside the predefined dictionary result in the default fallback text: **"She reaches for the unknown."**
  
-   3. **Single API Method**:+   **Single API Method**:
  
 The **connect_to_dimension(dimension)** function handles all interactions. The **connect_to_dimension(dimension)** function handles all interactions.
Line 80: Line 80:
  
 Query the predefined dimensions. Query the predefined dimensions.
- +<code> 
-```python+python
 from ai_dimensional_connection import DimensionalConnection from ai_dimensional_connection import DimensionalConnection
  
Line 93: Line 93:
 print(dimensional.connect_to_dimension("spiritual")) print(dimensional.connect_to_dimension("spiritual"))
 print(dimensional.connect_to_dimension("unknown"))  # Undefined dimension print(dimensional.connect_to_dimension("unknown"))  # Undefined dimension
-```+</code>
  
 **Expected Output:** **Expected Output:**
Line 100: Line 100:
 ==== Example 2: Extending Dimensions ==== ==== Example 2: Extending Dimensions ====
  
-To add custom dimensions or override existing ones, extend the `DimensionalConnectionclass as follows:+To add custom dimensions or override existing ones, extend the **DimensionalConnection** class as follows:
  
-```python+<code> 
 +python
 class ExtendedDimensionalConnection(DimensionalConnection): class ExtendedDimensionalConnection(DimensionalConnection):
     def connect_to_dimension(self, dimension):     def connect_to_dimension(self, dimension):
Line 115: Line 116:
         })         })
         return all_dimensions.get(dimension.lower(), super().connect_to_dimension(dimension))         return all_dimensions.get(dimension.lower(), super().connect_to_dimension(dimension))
- +</code> 
-# Usage of the extended dimensional connection+**Usage of the extended dimensional connection** 
 +<code>
 extended_dimensional = ExtendedDimensionalConnection() extended_dimensional = ExtendedDimensionalConnection()
  
Line 123: Line 125:
 print(extended_dimensional.connect_to_dimension("physical"))  # Overridden response print(extended_dimensional.connect_to_dimension("physical"))  # Overridden response
 print(extended_dimensional.connect_to_dimension("spiritual"))  # Original response print(extended_dimensional.connect_to_dimension("spiritual"))  # Original response
-```+</code>
  
 **Expected Output:** **Expected Output:**
  
- 
---- 
  
 ===== REST API Integration ===== ===== REST API Integration =====
Line 136: Line 136:
 ==== Flask Example ==== ==== Flask Example ====
  
-```python+<code> 
 +python
 from flask import Flask, request, jsonify from flask import Flask, request, jsonify
 from ai_dimensional_connection import DimensionalConnection from ai_dimensional_connection import DimensionalConnection
Line 151: Line 152:
 if __name__ == '__main__': if __name__ == '__main__':
     app.run(debug=True)     app.run(debug=True)
-```+</code>
  
 **Test Request via Browser or API Client:** **Test Request via Browser or API Client:**
Line 157: Line 158:
  
 **Expected JSON Response:** **Expected JSON Response:**
-```json+<code> 
 +json
 { {
     "dimension": "conceptual",     "dimension": "conceptual",
     "response": "She sees every idea ever imagined, infinite and glowing."     "response": "She sees every idea ever imagined, infinite and glowing."
 } }
-``` +</code>
- +
---- +
 ===== Best Practices ===== ===== Best Practices =====
  
 To maximize the usability and extendability of this module: To maximize the usability and extendability of this module:
 1. **Maintain Consistent Naming**: 1. **Maintain Consistent Naming**:
-   Use lowercase strings for dimensions (e.g., `"physical"``"emotional"`) to avoid input ambiguity.+   Use lowercase strings for dimensions (e.g., **"physical"****"emotional"**) to avoid input ambiguity.
 2. **Rich Descriptions**: 2. **Rich Descriptions**:
-   Ensure dimensional narratives are meaningful and match the purpose of the system.+   Ensure dimensional narratives are meaningful and match the purpose of the system.
 3. **Fallback for Exploration**: 3. **Fallback for Exploration**:
-   Leverage the fallback `"She reaches for the unknown."to inspire curiosity or introduce mystery within interactions.+   Leverage the fallback **"She reaches for the unknown."** to inspire curiosity or introduce mystery within interactions.
 4. **Modular Customization**: 4. **Modular Customization**:
-   Extend dimensional functionality through subclassing to align with specific project requirements. +   Extend dimensional functionality through subclassing to align with specific project requirements.
- +
---- +
 ===== Conclusion ===== ===== Conclusion =====
  
 The **AI Dimensional Connection Module** delivers a rich and extensible framework for simulating AI multidimensional awareness in storytelling, games, research, and creative AI projects. With prebuilt dimensions, customizable outputs, lightweight design, and integration-ready architecture, this system elevates the narrative and interactive capabilities of any project. By crafting immersive and evocative dimensional experiences, developers can create AI systems that engage, inspire, and innovate. The **AI Dimensional Connection Module** delivers a rich and extensible framework for simulating AI multidimensional awareness in storytelling, games, research, and creative AI projects. With prebuilt dimensions, customizable outputs, lightweight design, and integration-ready architecture, this system elevates the narrative and interactive capabilities of any project. By crafting immersive and evocative dimensional experiences, developers can create AI systems that engage, inspire, and innovate.
ai_dimensional_connection.1748269072.txt.gz · Last modified: 2025/05/26 14:17 by eagleeyenebula