feat: database layer + canvas validator/converter + LLM inference activities
ci / test (push) Failing after 2m11s
ci / test (push) Failing after 2m11s
- Add pkg/db models and CRUD methods for workflows - Add internal/routing canvas validator (DAG check, connectivity) - Add internal/routing canvas converter (Canvas → WorkflowSpec) - Register LLMInferenceActivity and LLMBatchInferenceActivity - Update api/server and cmd/server with database integration - Add K8s environment variable support - Update activity knowledge base with LLM activities - Add .env.example configuration template
This commit is contained in:
@@ -473,10 +473,130 @@
|
||||
"dependencies": [],
|
||||
"notes": "Must run before LLM Router to provide auth token. Call early in workflow."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "LLMInferenceActivity",
|
||||
"description": "Call LLM API with custom prompt and get response text",
|
||||
"category": "llm",
|
||||
"inputs": {
|
||||
"model": {
|
||||
"type": "string",
|
||||
"description": "Model ID (reasoning, ornith:35b, ornith:13b, qwen2.5:3b)",
|
||||
"required": true,
|
||||
"examples": ["reasoning", "ornith:35b"]
|
||||
},
|
||||
"system_prompt": {
|
||||
"type": "string",
|
||||
"description": "System instruction for the model",
|
||||
"required": false,
|
||||
"default": ""
|
||||
},
|
||||
"user_prompt": {
|
||||
"type": "string",
|
||||
"description": "User message to send to the model",
|
||||
"required": true
|
||||
},
|
||||
"temperature": {
|
||||
"type": "number",
|
||||
"description": "Sampling temperature (0.0-1.0, higher=more creative)",
|
||||
"required": false,
|
||||
"default": 0.7
|
||||
},
|
||||
"max_tokens": {
|
||||
"type": "integer",
|
||||
"description": "Maximum tokens in response",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"outputs": {
|
||||
"response": {
|
||||
"type": "string",
|
||||
"description": "LLM response text"
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"description": "Model used for inference"
|
||||
},
|
||||
"stop_reason": {
|
||||
"type": "string",
|
||||
"description": "Why inference stopped (stop_sequence, length, etc)"
|
||||
},
|
||||
"tokens_used": {
|
||||
"type": "integer",
|
||||
"description": "Total tokens consumed"
|
||||
}
|
||||
},
|
||||
"constraints": {
|
||||
"defaultTimeout": "120s",
|
||||
"isFlaky": true,
|
||||
"recommendedRetries": 2,
|
||||
"retryBackoff": 2.0,
|
||||
"dependencies": [],
|
||||
"notes": "API-dependent. Network flaky. Use for single prompts. See LLMBatchInferenceActivity for multiple."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "LLMBatchInferenceActivity",
|
||||
"description": "Call LLM API multiple times sequentially with different prompts",
|
||||
"category": "llm",
|
||||
"inputs": {
|
||||
"model": {
|
||||
"type": "string",
|
||||
"description": "Model ID (reasoning, ornith:35b, ornith:13b, qwen2.5:3b)",
|
||||
"required": true
|
||||
},
|
||||
"system_prompt": {
|
||||
"type": "string",
|
||||
"description": "System instruction (same for all prompts)",
|
||||
"required": false
|
||||
},
|
||||
"prompts": {
|
||||
"type": "array",
|
||||
"description": "List of user prompts to process",
|
||||
"required": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"temperature": {
|
||||
"type": "number",
|
||||
"description": "Sampling temperature (0.0-1.0)",
|
||||
"required": false,
|
||||
"default": 0.7
|
||||
}
|
||||
},
|
||||
"outputs": {
|
||||
"responses": {
|
||||
"type": "array",
|
||||
"description": "List of LLM responses (parallel to input prompts)",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"description": "Model used"
|
||||
},
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"description": "Error messages for failed prompts",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"constraints": {
|
||||
"defaultTimeout": "600s",
|
||||
"isFlaky": true,
|
||||
"recommendedRetries": 1,
|
||||
"retryBackoff": 2.0,
|
||||
"dependencies": [],
|
||||
"notes": "Sequential processing of multiple prompts. Use for batch analysis, summarization, etc."
|
||||
}
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"totalActivities": 10,
|
||||
"totalActivities": 12,
|
||||
"lastUpdated": "2025-08-31T00:00:00Z",
|
||||
"categories": {
|
||||
"repository": 1,
|
||||
@@ -488,7 +608,8 @@
|
||||
"approval": 1,
|
||||
"storage": 1,
|
||||
"memory": 1,
|
||||
"authentication": 1
|
||||
"authentication": 1,
|
||||
"llm": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user