fix: Pass strings to integrate(), not numpy arrays
This commit is contained in:
+6
-8
@@ -108,18 +108,16 @@ async def process_input(input_data: Dict[str, Any]) -> Dict[str, Any]:
|
|||||||
|
|
||||||
# Process based on input type
|
# Process based on input type
|
||||||
if input_type == "text":
|
if input_type == "text":
|
||||||
# Convert text to temporal input
|
# Pass text directly - the engine handles encoding
|
||||||
# Simple encoding: use ord values as phase signals
|
result = await master.integrate(content[:512])
|
||||||
signals = np.array([ord(c) / 127.0 for c in content[:512]], dtype=np.float32)
|
|
||||||
result = await master.integrate(signals)
|
|
||||||
elif input_type == "tokens":
|
elif input_type == "tokens":
|
||||||
# Direct token input (for LLM integration)
|
# Convert tokens to string representation
|
||||||
tokens = input_data.get("tokens", [])
|
tokens = input_data.get("tokens", [])
|
||||||
result = await master.integrate(np.array(tokens, dtype=np.float32))
|
result = await master.integrate(str(tokens)[:512])
|
||||||
elif input_type == "phase":
|
elif input_type == "phase":
|
||||||
# Direct phase input
|
# Convert phases to string representation
|
||||||
phases = input_data.get("phases", [])
|
phases = input_data.get("phases", [])
|
||||||
result = await master.integrate(np.array(phases, dtype=np.float32))
|
result = await master.integrate(str(phases)[:512])
|
||||||
else:
|
else:
|
||||||
return {"error": f"Unknown input type: {input_type}"}
|
return {"error": f"Unknown input type: {input_type}"}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user