diff --git a/connectors/connectorAiOpenai.py b/connectors/connectorAiOpenai.py index e394030d..fd03af86 100644 --- a/connectors/connectorAiOpenai.py +++ b/connectors/connectorAiOpenai.py @@ -1,4 +1,5 @@ import logging +import base64 import httpx from typing import Dict, Any, List, Union from fastapi import HTTPException @@ -93,7 +94,7 @@ class ChatService: Analyzes an image with the OpenAI Vision API. Args: - imageData: Either a file path (str) or image data (bytes) + imageData: base64encoded data mimeType: The MIME type of the image (optional, only for binary data) prompt: The prompt for analysis @@ -101,23 +102,7 @@ class ChatService: The response from the OpenAI Vision API as text """ try: - logger.debug("Starting image analysis...") - # Distinguish between file path and binary data - if isinstance(imageData, str): - # It's a file path - import filehandling only when needed - from modules import agentserviceFilemanager as fileHandler - base64Data, autoMimeType = fileHandler.encodeFileToBase64(imageData) - mimeType = mimeType or autoMimeType - else: - # It's binary data - import base64 - base64Data = base64.b64encode(imageData).decode('utf-8') - # MIME type must be specified for binary data - if not mimeType: - # Fallback to generic image type - mimeType = "image/png" - - # Prepare the payload for the Vision API + logger.debug(f"Starting image analysis for {mimeType} with query '{prompt}' for {mimeType} size {len(imageData)}B...") messages = [ { "role": "user", @@ -126,7 +111,7 @@ class ChatService: { "type": "image_url", "image_url": { - "url": f"data:{mimeType};base64,{base64Data}" + "url": f"data:{mimeType};base64,{imageData}" } } ] diff --git a/connectors/connectorDbJson.py b/connectors/connectorDbJson.py index 449d3bb3..de8f8b63 100644 --- a/connectors/connectorDbJson.py +++ b/connectors/connectorDbJson.py @@ -56,7 +56,6 @@ class DatabaseConnector: self.mandateId = self._mandateId self.userId = self._userId - logger.info(f"DatabaseConnector initialized for directory: {self.dbFolder}") logger.debug(f"Context: mandateId={self.mandateId}, userId={self.userId}") def _initializeSystemTable(self): @@ -286,7 +285,6 @@ class DatabaseConnector: def getRecordset(self, table: str, fieldFilter: List[str] = None, recordFilter: Dict[str, Any] = None) -> List[Dict[str, Any]]: """Returns a list of records from a table, filtered by criteria.""" data = self._loadTable(table) - logger.debug(f"getRecordset: data volume of {len(data)} records") # Apply recordFilter if available if recordFilter: diff --git a/modules/agentAnalyst.py b/modules/agentAnalyst.py index 853b3955..5e68c91e 100644 --- a/modules/agentAnalyst.py +++ b/modules/agentAnalyst.py @@ -23,6 +23,7 @@ class AgentAnalyst(AgentBase): """Initialize the data analysis agent""" super().__init__() self.name = "analyst" + self.label = "Data Analysis" self.description = "Analyzes data using AI-powered insights and visualizations, produce diagrams and visualizations" self.capabilities = [ "dataAnalysis", diff --git a/modules/agentCoach.py b/modules/agentCoach.py new file mode 100644 index 00000000..6a0616bf --- /dev/null +++ b/modules/agentCoach.py @@ -0,0 +1,376 @@ +""" +Coach agent for answering questions and generating structured content. +Provides direct AI-based responses using extracted data from documents. +""" + +import logging +from typing import Dict, Any, List +import json +from datetime import datetime + +from modules.workflowAgentsRegistry import AgentBase + +logger = logging.getLogger(__name__) + +class AgentCoach(AgentBase): + """AI-driven agent for answering questions and generating structured content from extracted data""" + + def __init__(self): + """Initialize the coach agent""" + super().__init__() + self.name = "coach" + self.label = "Coach & Assistant" + self.description = "Answers questions and generates content directly from extracted data without complex processing" + self.capabilities = [ + "questionAnswering", + "contentGeneration", + "simpleDataFormatting", + "informationSynthesis", + "directResponse", + "imageInterpretation", + "structuredOutput" + ] + + def setDependencies(self, mydom=None): + """Set external dependencies for the agent.""" + self.mydom = mydom + + async def processTask(self, task: Dict[str, Any]) -> Dict[str, Any]: + """ + Process a task by directly using AI to provide answers or content based on extracted data. + + Args: + task: Task dictionary with prompt, inputDocuments, outputSpecifications + + Returns: + Dictionary with feedback and documents + """ + try: + # Extract task information + prompt = task.get("prompt", "") + inputDocuments = task.get("inputDocuments", []) + outputSpecs = task.get("outputSpecifications", []) + + # Check AI service + if not self.mydom: + return { + "feedback": "The Coach agent requires an AI service to function.", + "documents": [] + } + + # Collect all extracted data from input documents + documentContext = self._collectExtractedData(inputDocuments) + + # Generate task understanding to guide response creation + taskUnderstanding = await self._analyzeTask(prompt, documentContext) + + # Generate documents based on output specifications + documents = [] + + # If no output specs provided, create a default document + if not outputSpecs: + defaultFormat = taskUnderstanding.get("recommendedFormat", "md") + defaultTitle = taskUnderstanding.get("suggestedFilename", "response") + + outputSpecs = [{ + "label": f"{defaultTitle}.{defaultFormat}", + "description": "Response to your request" + }] + + # Process each output specification + for spec in outputSpecs: + outputLabel = spec.get("label", "output.txt") + outputDescription = spec.get("description", "") + + # Determine format based on file extension + outputFormat = outputLabel.split('.')[-1].lower() if '.' in outputLabel else "txt" + + # Generate document based on format + document = await self._generateDocument( + prompt, + documentContext, + outputLabel, + outputFormat, + outputDescription, + taskUnderstanding + ) + + documents.append(document) + + # Generate feedback + feedback = taskUnderstanding.get("feedback", "I've created content based on your request.") + + return { + "feedback": feedback, + "documents": documents + } + + except Exception as e: + logger.error(f"Error in coach processing: {str(e)}", exc_info=True) + return { + "feedback": f"Error while processing your request: {str(e)}", + "documents": [] + } + + def _collectExtractedData(self, documents: List[Dict[str, Any]]) -> str: + """ + Collect extracted data from input documents. + + Args: + documents: List of input documents + + Returns: + Combined extracted data as text + """ + contextParts = [] + + for doc in documents: + docName = doc.get("name", "unnamed") + if doc.get("ext"): + docName = f"{docName}.{doc.get('ext')}" + + contextParts.append(f"\n\n--- {docName} ---\n") + + # Process contents, focusing on dataExtracted field + for content in doc.get("contents", []): + if content.get("dataExtracted"): + contextParts.append(content.get("dataExtracted", "")) + + return "\n".join(contextParts) + + async def _analyzeTask(self, prompt: str, context: str) -> Dict: + """ + Use AI to analyze the task and develop an understanding of what's required. + + Args: + prompt: The task prompt + context: Extracted document data + + Returns: + Task understanding dictionary + """ + analysisPrompt = f""" + Analyze this request to determine the best approach for creating a response. + + REQUEST: {prompt} + + EXTRACTED DATA: + {context[:1500]}... (truncated if longer) + + Create a task analysis in JSON format with the following structure: + {{ + "requestType": "question|content|data|report|description", + "recommendedFormat": "md|txt|html|csv|json", + "suggestedFilename": "appropriate_filename_without_extension", + "contentFocus": "brief description of what to focus on", + "feedback": "brief explanation of how you'll approach this request", + "complexity": "simple|moderate|complex" + }} + + Only return valid JSON. No preamble or explanations. + """ + + try: + response = await self.mydom.callAi([ + {"role": "system", "content": "You are a task analysis expert. Respond with valid JSON only."}, + {"role": "user", "content": analysisPrompt} + ]) + + # Extract JSON from response + jsonStart = response.find('{') + jsonEnd = response.rfind('}') + 1 + + if jsonStart >= 0 and jsonEnd > jsonStart: + taskUnderstanding = json.loads(response[jsonStart:jsonEnd]) + return taskUnderstanding + else: + # Fallback if JSON not found + return { + "requestType": "content", + "recommendedFormat": "md", + "suggestedFilename": "response", + "contentFocus": "Addressing the main request", + "feedback": "I've created content based on your request and the provided data.", + "complexity": "moderate" + } + + except Exception as e: + logger.warning(f"Error analyzing task: {str(e)}") + return { + "requestType": "content", + "recommendedFormat": "md", + "suggestedFilename": "response", + "contentFocus": "Addressing the main request", + "feedback": "I've created content based on your request and the provided data.", + "complexity": "moderate" + } + + async def _generateDocument(self, prompt: str, context: str, outputLabel: str, + outputFormat: str, description: str, taskUnderstanding: Dict) -> Dict[str, Any]: + """ + Generate a document based on the request and extracted data. + + Args: + prompt: The task prompt + context: Extracted document data + outputLabel: Output filename + outputFormat: Output format (file extension) + description: Output description + taskUnderstanding: Task understanding from analysis + + Returns: + Document object + """ + # Determine content type based on format + contentType = self._getContentType(outputFormat) + + # Build prompt based on output format + generationPrompt = f""" + Create a response to the following request in {outputFormat} format: + + REQUEST: {prompt} + + EXTRACTED DATA: + {context} + + OUTPUT REQUIREMENTS: + - Filename: {outputLabel} + - Format: {outputFormat} + - Description: {description} + - Focus on: {taskUnderstanding.get("contentFocus", "Addressing the main request")} + + Guidelines: + 1. Create content that directly addresses the request + 2. Use the extracted data to inform your response + 3. Format the output appropriately for {outputFormat} + 4. Be comprehensive but focused + 5. Include appropriate formatting, structure, and organization + + Your response should be in valid {outputFormat} format without explanations or markdown formatting around it. + """ + + try: + # Build system prompt based on format + systemPrompt = f"You create {outputFormat} format content based on requests and extracted data. Provide only the content in valid {outputFormat} format." + + # Generate content with AI + content = await self.mydom.callAi([ + {"role": "system", "content": systemPrompt}, + {"role": "user", "content": generationPrompt} + ]) + + # Process content based on format + if outputFormat in ["json", "csv"]: + # For structured formats, extract from code blocks if present + content = self._extractFromCodeBlocks(content, outputFormat) + + # Validate JSON if needed + if outputFormat == "json": + try: + json.loads(content) + except: + logger.warning("Invalid JSON generated, attempting to fix") + # Try to extract just the JSON portion + jsonStart = content.find('{') + jsonEnd = content.rfind('}') + 1 + if jsonStart >= 0 and jsonEnd > jsonStart: + content = content[jsonStart:jsonEnd] + + # Ensure proper structure for markdown/HTML + if outputFormat in ["md", "markdown"] and not content.strip().startswith("#"): + title = "Response" + content = f"# {title}\n\n{content}" + elif outputFormat == "html" and not "
{errorMessage}
" + else: + return f"Error: {errorMessage}" + + +# Factory function for the Coach agent +def getAgentCoach(): + """Returns an instance of the Coach agent.""" + return AgentCoach() \ No newline at end of file diff --git a/modules/agentCoder.py b/modules/agentCoder.py index 0286a157..9af8fd7d 100644 --- a/modules/agentCoder.py +++ b/modules/agentCoder.py @@ -24,6 +24,7 @@ class AgentCoder(AgentBase): """Initialize the coder agent""" super().__init__() self.name = "coder" + self.label = "Developer and Code Executor" self.description = "Develops and executes Python code for data processing and automation" self.capabilities = [ "code_development", diff --git a/modules/agentDocumentation.py b/modules/agentDocumentation.py index daae8a97..38b401d2 100644 --- a/modules/agentDocumentation.py +++ b/modules/agentDocumentation.py @@ -18,6 +18,7 @@ class AgentDocumentation(AgentBase): """Initialize the documentation agent""" super().__init__() self.name = "documentation" + self.label = "Documentation" self.description = "Creates structured documentation, reports, and content using AI with multi-step generation" self.capabilities = [ "report_generation", @@ -59,7 +60,8 @@ class AgentDocumentation(AgentBase): # Create task analysis to understand the requirements documentationPlan = await self._analyzeTask(prompt, documentContext, outputSpecs) - + logger.debug(f"Documentation plan: {documentationPlan}") + # Generate all required output documents documents = [] @@ -216,7 +218,7 @@ class AgentDocumentation(AgentBase): else: # Fallback if JSON not found return { - "title": "Documentation", + "title": "Documentation (DEFAULT)", "documentType": "report", "audience": "general", "detailedStructure": [ @@ -332,17 +334,17 @@ class AgentDocumentation(AgentBase): # Fallback structure if none provided detailedStructure = [ { - "title": "Introduction", + "title": "Introduction (Default)", "keyPoints": ["Purpose", "Scope"], "importance": "high" }, { - "title": "Main Content", + "title": "Main Content (Default)", "keyPoints": ["Core Information"], "importance": "high" }, { - "title": "Conclusion", + "title": "Conclusion (Default)", "keyPoints": ["Summary", "Next Steps"], "importance": "medium" } @@ -351,25 +353,25 @@ class AgentDocumentation(AgentBase): try: # Step 1: Generate document introduction introPrompt = f""" - Create the introduction for a {documentType} titled "{title}". - - DOCUMENT OVERVIEW: - - Type: {documentType} - - Audience: {audience} - - Tone: {tone} - - Key Topics: {', '.join(keyTopics)} - - Format: {formatType} - - TASK CONTEXT: {prompt} - - This introduction should: - 1. Clearly state the purpose and scope of the document - 2. Provide context and background information - 3. Outline what the reader will find in the document - 4. Set the appropriate tone for the {audience} audience - - The introduction should be professional and engaging, formatted according to {formatType} standards. - """ +Create the introduction for a {documentType} titled "{title}". + +DOCUMENT OVERVIEW: +- Type: {documentType} +- Audience: {audience} +- Tone: {tone} +- Key Topics: {', '.join(keyTopics)} +- Format: {formatType} + +TASK CONTEXT: {prompt} + +This introduction should: +1. Clearly state the purpose and scope of the document +2. Provide context and background information +3. Outline what the reader will find in the document +4. Set the appropriate tone for the {audience} audience + +The introduction should be professional and engaging, but short and precise, formatted according to {formatType} standards. do not add details, which are not requested by the Task Context. +""" introduction = await self.mydom.callAi([ {"role": "system", "content": f"You are a documentation expert creating an introduction in {formatType} format."}, @@ -417,35 +419,35 @@ class AgentDocumentation(AgentBase): detailLevel = "high" if importance == "high" else "medium" sectionPrompt = f""" - Create the "{sectionTitle}" section for a {documentType} titled "{title}". - - SECTION DETAILS: - - Title: {sectionTitle} - - Key Points to Cover: {', '.join(keyPoints)} - - Subsections: {', '.join(subsections)} - - Detail Level: {detailLevel} - - DOCUMENT CONTEXT: - - Type: {documentType} - - Audience: {audience} - - Tone: {tone} - - Format: {formatType} - - TASK CONTEXT: {prompt} - - AVAILABLE INFORMATION: - {context[:500]}... (truncated) - - This section should: - 1. Be comprehensive and well-structured - 2. Cover all the key points listed - 3. Include the specified subsections with appropriate headings - 4. Maintain a {tone} tone suitable for the {audience} audience - 5. Be properly formatted according to {formatType} standards - 6. Include specific examples, data, or evidence where appropriate - - Be thorough in your coverage of this section, providing substantive content. - """ +Create the "{sectionTitle}" section for a {documentType} titled "{title}". + +SECTION DETAILS: +- Title: {sectionTitle} +- Key Points to Cover: {', '.join(keyPoints)} +- Subsections: {', '.join(subsections)} +- Detail Level: {detailLevel} + +DOCUMENT CONTEXT: +- Type: {documentType} +- Audience: {audience} +- Tone: {tone} +- Format: {formatType} + +TASK CONTEXT: {prompt} + +AVAILABLE INFORMATION: +{context[:500]}... (truncated) + +This section should: +1. Be comprehensive and well-structured +2. Cover all the key points listed +3. Include the specified subsections with appropriate headings +4. Maintain a {tone} tone suitable for the {audience} audience +5. Be properly formatted according to {formatType} standards +6. Include specific examples, data, or evidence where appropriate + +Be thorough in your coverage of this section, providing substantive content focussing on the Task content. +""" sectionContent = await self.mydom.callAi([ {"role": "system", "content": f"You are a documentation expert creating detailed content for the {sectionTitle} section."}, diff --git a/modules/agentWebcrawler.py b/modules/agentWebcrawler.py index cc2fe3f7..7f5cad09 100644 --- a/modules/agentWebcrawler.py +++ b/modules/agentWebcrawler.py @@ -26,6 +26,7 @@ class AgentWebcrawler(AgentBase): """Initialize the webcrawler agent""" super().__init__() self.name = "webcrawler" + self.label = "Web-Research" self.description = "Conducts web research and collects information from online sources" self.capabilities = [ "webSearch", diff --git a/modules/documentProcessor.py b/modules/documentProcessor.py index 528109be..d3b637e1 100644 --- a/modules/documentProcessor.py +++ b/modules/documentProcessor.py @@ -206,7 +206,7 @@ def extractTextContent(fileName: str, fileContent: bytes, mimeType: str) -> List "sequenceNr": 1, "name": "1_text", # Simplified naming "ext": fileExtension, - "contentType": "text", + "contentType": "text/plain", "data": textContent, "base64Encoded": False, "metadata": { @@ -225,7 +225,7 @@ def extractTextContent(fileName: str, fileContent: bytes, mimeType: str) -> List "sequenceNr": 1, "name": "1_text", # Simplified naming "ext": fileExtension, - "contentType": "text", + "contentType": "text/plain", "data": textContent, "base64Encoded": False, "metadata": { @@ -282,7 +282,7 @@ def extractCsvContent(fileName: str, fileContent: bytes) -> List[Dict[str, Any]] "sequenceNr": 1, "name": "1_csv", # Simplified naming "ext": "csv", - "contentType": "csv", + "contentType": "text/csv", "data": csvContent, "base64Encoded": False, "metadata": { @@ -302,7 +302,7 @@ def extractCsvContent(fileName: str, fileContent: bytes) -> List[Dict[str, Any]] "sequenceNr": 1, "name": "1_csv", # Simplified naming "ext": "csv", - "contentType": "csv", + "contentType": "text/csv", "data": csvContent, "base64Encoded": False, "metadata": { @@ -519,7 +519,7 @@ def extractImageContent(fileName: str, fileContent: bytes, mimeType: str) -> Lis "sequenceNr": 1, "name": "1_image", # Simplified naming "ext": fileExtension, - "contentType": "image", + "contentType": mimeType, "data": encoded_data, "base64Encoded": True, "metadata": imageMetadata @@ -531,7 +531,7 @@ def extractImageContent(fileName: str, fileContent: bytes, mimeType: str) -> Lis "sequenceNr": 2, "name": "2_text_image_info", # Simplified naming with label "ext": "txt", - "contentType": "text", + "contentType": "text/plain", "data": imageDescription, "base64Encoded": False, "metadata": { @@ -604,7 +604,7 @@ def extractPdfContent(fileName: str, fileContent: bytes) -> List[Dict[str, Any]] "sequenceNr": len(contents) + 1, "name": f"{len(contents) + 1}_text", # Simplified naming "ext": "txt", - "contentType": "text", + "contentType": "text/plain", "data": extractedText, "base64Encoded": False, "metadata": { @@ -743,7 +743,7 @@ def extractWordContent(fileName: str, fileContent: bytes, mimeType: str) -> List "sequenceNr": 1, "name": "1_text", # Simplified naming "ext": "txt", - "contentType": "text", + "contentType": "text/plain", "data": extractedText, "base64Encoded": False, "metadata": { @@ -845,7 +845,7 @@ def extractExcelContent(fileName: str, fileContent: bytes, mimeType: str) -> Lis "sequenceNr": len(contents) + 1, "name": f"{len(contents) + 1}_csv_{sheetSafeName}", # Simplified naming with sheet label "ext": "csv", - "contentType": "csv", + "contentType": "text/csv", "data": csvContent, "base64Encoded": False, "metadata": { diff --git a/modules/gatewayInterface.py b/modules/gatewayInterface.py index 7c7f0aea..94359949 100644 --- a/modules/gatewayInterface.py +++ b/modules/gatewayInterface.py @@ -393,7 +393,9 @@ class GatewayInterface: def authenticateUser(self, username: str, password: str) -> Optional[Dict[str, Any]]: """Authenticates a user by username and password.""" - user = self.getUserByUsername(username) + # Instead of using UAM filtering, directly get user from database + users = self.db.getRecordset("users") + user = next((u for u in users if u.get("username") == username), None) if not user: return None @@ -412,6 +414,7 @@ class GatewayInterface: return authenticatedUser + def updateUser(self, userId: int, userData: Dict[str, Any]) -> Dict[str, Any]: """Updates a user if current user has permission.""" # Check if the user exists and current user has access diff --git a/modules/lucydomInterface.py b/modules/lucydomInterface.py index ac779782..f0f91b2d 100644 --- a/modules/lucydomInterface.py +++ b/modules/lucydomInterface.py @@ -263,6 +263,13 @@ class LucyDOMInterface: else: return await self.aiService.callApi(messages) + async def callAi4Image(self, imageData: Union[str, bytes], mimeType: str = None, prompt: str = "Describe this image") -> str: + """Enhanced AI service call with language support.""" + if not self.aiService: + logger.error("AI service not set in LucyDOMInterface") + return "Error: AI service not available" + return await self.aiService.analyzeImage(imageData, mimeType, prompt) + # Utilities def getInitialId(self, table: str) -> Optional[int]: @@ -680,7 +687,7 @@ class LucyDOMInterface: self.createFileData(dbFile["id"], fileContent) # Debug: Export file to static folder - # self._exportFileToStatic(fileContent, dbFile["id"], fileName) + self._exportFileToStatic(fileContent, dbFile["id"], fileName) logger.info(f"File upload process completed for: {fileName}") return dbFile diff --git a/modules/workflowAgentsRegistry.py b/modules/workflowAgentsRegistry.py index 8cd7d63d..25d8d2ff 100644 --- a/modules/workflowAgentsRegistry.py +++ b/modules/workflowAgentsRegistry.py @@ -28,6 +28,7 @@ class AgentBase: def __init__(self): """Initialize the base agent.""" self.name = "base-agent" + self.label = "(Template)" self.description = "Basic agent functionality" self.capabilities = [] self.mydom = None diff --git a/modules/workflowManager.py b/modules/workflowManager.py index 087cb5a1..5d89d311 100644 --- a/modules/workflowManager.py +++ b/modules/workflowManager.py @@ -135,7 +135,7 @@ class WorkflowManager: try: # State 3: User Message Processing self.checkExitCriteria(workflow) - messageUser = await self.chatMessageToWorkflow("user", "", userInput, workflow) + messageUser = await self.chatMessageToWorkflow("user", None, userInput, workflow) messageUser["status"] = "first" # For first message # State 4: Project Manager Analysis @@ -155,7 +155,7 @@ class WorkflowManager: self.checkExitCriteria(workflow) responseMessage = { "role": "assistant", - "agentName": "project_manager", + "agentName": "Project Manager", "content": objUserResponse, "status": "step" # As per state machine specification } @@ -228,10 +228,8 @@ class WorkflowManager: """ currentTime = datetime.now().isoformat() - logger.debug(f"CHECK DATA0 id'{workflowId}'") workflowExist=self.mydom.getWorkflow(workflowId) if workflowId is None or not workflowExist: - logger.debug(f"CHECK DATA1 id'{workflowId}'") # Create new workflow newWorkflowId = str(uuid.uuid4()) if workflowId is None else workflowId workflow = { @@ -277,8 +275,8 @@ class WorkflowManager: workflow["messageIds"] = [msg["id"] for msg in workflow.get("messages", [])] # Update in database - self.mydom.updateWorkflow(workflowId, {"messageIds": workflow["messageIds"]}) - + self.mydom.updateWorkflow(workflowId, {"messageIds": workflow["messageIds"]}) + # Update status and increment round counter workflow["status"] = "running" workflow["lastActivity"] = currentTime @@ -467,24 +465,25 @@ JSON_OUTPUT = {{ agentName = task.get("agent") agentPrompt = task.get("prompt", "") + # Get agent from registry + agent = self.agentRegistry.getAgent(agentName) + if not agent: + logger.error(f"Agent '{agentName}' not found") + return [] + agentLabel = agent.label + # Log the current step outputLabels = [] for doc in task.get("outputDocuments", []): outputLabels.append(doc.get("label", "unknown")) - stepInfo = f"Agent '{agentName}' to create {', '.join(outputLabels)}." + stepInfo = f"Agent {agentLabel} to create {', '.join(outputLabels)}." self.logAdd(workflow, stepInfo, level="info") # Check if prompt is empty if agentPrompt == "": logger.warning("Empty prompt, no task to do") return [] - - # Get agent from registry - agent = self.agentRegistry.getAgent(agentName) - if not agent: - logger.error(f"Agent '{agentName}' not found") - return [] # Prepare output document specifications outputSpecs = [] @@ -526,7 +525,7 @@ JSON_OUTPUT = {{ # Log the agent response self.logAdd( workflow, - f"Agent '{agentName}' completed task. Feedback: {agentResults.get('feedback', 'No feedback provided')}", + f"Agent {agentLabel} completed task. Feedback: {agentResults.get('feedback', 'No feedback provided')}", level="info" ) @@ -537,14 +536,14 @@ JSON_OUTPUT = {{ } # Create a message in the workflow with the agent's response - agentMessage = await self.chatMessageToWorkflow("assistant", agentName, agentInputs, workflow) + agentMessage = await self.chatMessageToWorkflow("assistant", agent, agentInputs, workflow) agentMessage["status"] = "step" # As per state machine specification logger.debug(f"Agent result = {self.parseJson2text(agentMessage)}.") return agentMessage.get("documents", []) except Exception as e: - errorMsg = f"Error executing agent '{agentName}': {str(e)}" + errorMsg = f"Error executing agent '{agentLabel}': {str(e)}" logger.error(errorMsg, exc_info=True) # Add exc_info=True to get full traceback self.logAdd(workflow, errorMsg, level="error") return [] @@ -599,7 +598,7 @@ filesDelivered = {self.parseJson2text(matchingDocuments)} logger.debug(f"FINAL PROMPT = {self.parseJson2text(finalPrompt)}.") finalMessage = { "role": "assistant", - "agentName": "project_manager", + "agentName": "Project Manager", "content": finalPrompt, "documents": [] # DO NOT include the results documents, already with agents } @@ -668,7 +667,7 @@ filesDelivered = {self.parseJson2text(matchingDocuments)} return f"[{role} {agentName}]: {contentSummary}{docsSummary}" - async def chatMessageToWorkflow(self, role: str, agentName: str, chatMessage: Dict[str, Any], workflow: Dict[str, Any]) -> Dict[str, Any]: + async def chatMessageToWorkflow(self, role: str, agent: Dict[str, Any], chatMessage: Dict[str, Any], workflow: Dict[str, Any]) -> Dict[str, Any]: """ Integrates user inputs into a Message object including files with complete contents (State 3: User Message Processing). @@ -681,6 +680,8 @@ filesDelivered = {self.parseJson2text(matchingDocuments)} Returns: Message object with content and documents including contents """ + agentName = "" if agent is None else agent.name + agentLabel = "" if agent is None else agent.label logger.info(f"Message from {role} {agentName} sent with {len(chatMessage.get('listFileId', []))} documents") logger.debug(f"message = {self.parseJson2text(chatMessage)}.") @@ -701,7 +702,7 @@ filesDelivered = {self.parseJson2text(matchingDocuments)} # Create message object messageObject = { "role": role, - "agentName": agentName, + "agentName": agentLabel, "content": messageContent, "documents": additionalFiles, "status": chatMessage.get("status", "") @@ -931,15 +932,8 @@ filesDelivered = {self.parseJson2text(matchingDocuments)} try: # For image content, use the specialized image analysis - if contentType.startswith("image/") or content.get("metadata", {}).get("isImage", False): - # analyzeImage handles base64 encoded data internally - return await self.mydom.analyzeImage(data, contentType, image_prompt) - - # For binary data (base64Encoded but not an image), provide a generic description - elif base64Encoded: - metadata = content.get("metadata", {}) - format_type = metadata.get("format", "unknown") - return f"Binary {format_type} data ({contentType})" + if base64Encoded: + return await self.mydom.callAi4Image(data, contentType, image_prompt) # For text data, use the regular AI processing else: diff --git a/routes/routeUsers.py b/routes/routeUsers.py index ed574274..d149125e 100644 --- a/routes/routeUsers.py +++ b/routes/routeUsers.py @@ -64,44 +64,64 @@ async def getUsers(currentUser: Dict[str, Any] = Depends(getCurrentActiveUser)): else: # sysadmin return context.interfaceData.getAllUsers() + @router.post("/register", response_model=Dict[str, Any]) async def registerUser(userData: dict = Body(...)): """Register a new user""" - # Don't use user context for registration - gateway = getGatewayInterface() + # Add debug logging to see what's coming in + import logging + logger = logging.getLogger(__name__) + logger.info(f"Registration request data: {userData}") + + # Get the initial IDs for mandate and admin user + adminGateway = getGatewayInterface() + + # Get ID of the root mandate - we'll use this for new users + rootMandateId = adminGateway.getInitialId("mandates") + adminUserId = adminGateway.getInitialId("users") + + if not rootMandateId or not adminUserId: + raise HTTPException( + status_code=500, + detail="System is not properly initialized with root mandate and admin user" + ) + + # Use a gateway with admin context for user creation + gateway = getGatewayInterface(rootMandateId, adminUserId) if "username" not in userData or "password" not in userData: raise HTTPException(status_code=400, detail="Username and password required") try: - # Prepare mandate data - mandateData = { - "name": f"Mandate of {userData['username']}", + # Create user data - explicitly set fields + userCreateData = { + "username": userData["username"], + "password": userData["password"], + "mandateId": rootMandateId, # Use the Root mandate + "disabled": False, + "privilege": "user", "language": userData.get("language", "de") } - newMandate = gateway.createMandate(**mandateData) - - # Filter user attributes from the request - userCreateData = {} - for attr in userAttributes: - if attr in userData and attr != "id": # ID is auto-assigned - userCreateData[attr] = userData[attr] - - # Required fields - userCreateData["username"] = userData["username"] - userCreateData["password"] = userData["password"] - userCreateData["mandateId"] = newMandate["id"] - - # Default values for optional fields - userCreateData.setdefault("disabled", False) - userCreateData.setdefault("privilege", "user") - userCreateData.setdefault("language", "de") - + # Explicitly add optional fields - only if they exist and are not empty + if "email" in userData and userData["email"]: + userCreateData["email"] = userData["email"] + + if "fullName" in userData and userData["fullName"]: + userCreateData["fullName"] = userData["fullName"] newUser = gateway.createUser(**userCreateData) return newUser except ValueError as e: + logger.error(f"ValueError in registration: {str(e)}") raise HTTPException(status_code=400, detail=str(e)) + except PermissionError as e: + logger.error(f"PermissionError in registration: {str(e)}") + raise HTTPException(status_code=403, detail=str(e)) + except Exception as e: + import traceback + logger.error(f"Unexpected error in registration: {str(e)}") + logger.error(traceback.format_exc()) + raise HTTPException(status_code=500, detail=f"Registration failed: {str(e)}") @router.get("/{userId}", response_model=Dict[str, Any]) async def getUser( diff --git a/static/1_LF-Details.png b/static/1_LF-Details.png new file mode 100644 index 00000000..3a2be57d Binary files /dev/null and b/static/1_LF-Details.png differ diff --git a/static/2_LF-Details_Description.txt b/static/2_LF-Details_Description.txt new file mode 100644 index 00000000..74ea1ecd --- /dev/null +++ b/static/2_LF-Details_Description.txt @@ -0,0 +1,295 @@ +Comprehensive Workflow and Team Roles in Product Development +============================================================ + +# Introduction to Comprehensive Workflow and Team Roles in Product Development + +## Purpose and Scope + +This guide, "Comprehensive Workflow and Team Roles in Product Development," is meticulously crafted to serve as an essential resource for professionals involved in the intricate process of product development. It aims to provide a detailed exploration of the workflows and team roles that are pivotal in transforming innovative ideas into successful products. By delving into the structured processes and collaborative dynamics that drive product development, this guide offers valuable insights into optimizing efficiency and effectiveness within technical teams. + +## Context and Background + +In today's fast-paced technological landscape, the development of a product from concept to market-ready status involves a complex interplay of various teams and tools. Each team, whether it be product management, engineering, quality assurance (QA), or operations, plays a critical role in ensuring that the product not only meets market demands but also adheres to high standards of quality and functionality. The integration of sophisticated tools for ticketing, roadmaps, and management dashboards further enhances the ability of these teams to coordinate and execute their tasks with precision. + +## Document Outline + +Readers of this guide will embark on a comprehensive journey through the product development lifecycle. The document is structured to provide: + +1. **An Overview of Product Development Workflow**: A detailed examination of the stages involved in product development, from initial concept through to deployment and maintenance. + +2. **Team Roles and Responsibilities**: Insight into the specific roles and responsibilities of the product, engineering, QA, and operations teams, highlighting how each contributes to the overall success of the product. + +3. **Tool Integration**: An analysis of the tools that facilitate seamless workflow management, including ticketing systems, roadmap planning tools, and management dashboards, and how they integrate into the daily operations of development teams. + +4. **Best Practices and Case Studies**: Practical examples and case studies that illustrate successful implementations of workflows and team collaborations in real-world scenarios. + +## Tone and Audience + +This guide is tailored for a technical audience, including product managers, engineers, QA specialists, and operations professionals. The tone is formal and professional, designed to engage readers who are seeking to deepen their understanding of product development processes and enhance their team's performance. By providing a structured and insightful examination of workflows and roles, this guide aims to empower technical teams to achieve greater synergy and success in their product development endeavors. + +Introduction +------------ + +# Introduction + +In the rapidly evolving landscape of product development, understanding the intricate workflow and the pivotal roles played by various teams is essential for achieving success. This guide, "Comprehensive Workflow and Team Roles in Product Development," aims to provide a detailed exploration of the processes and team dynamics that drive product innovation from conception to deployment. By delving into the workflow stages and the integration of essential tools, this guide serves as an invaluable resource for technical professionals seeking to optimize their product development strategies. + +## Overview of the Product Development Workflow + +The product development workflow is a structured sequence of stages that transforms initial ideas into market-ready products. This workflow is designed to ensure that each phase of development is meticulously planned and executed, minimizing risks and maximizing efficiency. The workflow typically begins with the **Input** stage, where ideas are sourced from customers, sales teams, and internal brainstorming sessions. These inputs serve as the foundation for the subsequent stages, guiding the product team in aligning development efforts with market needs and business objectives. + +The workflow progresses through several critical stages, each involving specific teams and processes: + +1. **Product Team:** + - **Discover:** + - **Collect:** The product team gathers a diverse array of ideas and inputs, ensuring a comprehensive understanding of potential opportunities. + - **Qualify:** Ideas are analyzed and matched against business goals, market trends, and feasibility, allowing the team to prioritize the most promising concepts. + +2. **Engineering Team:** + - **Design and Develop:** The engineering team translates qualified ideas into technical specifications and begins the development process, focusing on creating robust and scalable solutions. + +3. **Q&A Team:** + - **Test and Validate:** Quality assurance plays a crucial role in ensuring that the product meets the highest standards of quality and functionality. Rigorous testing and validation processes are employed to identify and rectify any issues before release. + +4. **Operations:** + - **Deploy and Monitor:** The operations team is responsible for deploying the product to the market and continuously monitoring its performance. This stage involves the integration of feedback loops to facilitate ongoing improvements and adaptations. + +## Importance of Team Roles and Tool Integration + +The success of the product development process hinges on the effective collaboration and coordination of various teams, each contributing their unique expertise and perspectives. The **Product Team** is tasked with strategic planning and market alignment, while the **Engineering Team** focuses on technical execution. The **Q&A Team** ensures quality assurance, and the **Operations Team** manages deployment and performance monitoring. + +In addition to clearly defined roles, the integration of specialized tools is crucial for streamlining workflows and enhancing productivity. Tools for **ticketing** facilitate efficient task management and communication across teams, ensuring that issues are promptly addressed and resolved. **Roadmaps** provide a visual representation of the product development timeline, helping teams stay aligned with project goals and deadlines. **Management dashboards** offer real-time insights into project progress and performance metrics, enabling informed decision-making and strategic adjustments. + +By leveraging these tools, teams can enhance collaboration, improve transparency, and maintain a cohesive approach to product development. This integration not only optimizes the workflow but also empowers teams to deliver high-quality products that meet customer expectations and drive business success. + +In conclusion, understanding the comprehensive workflow and the critical roles of each team in product development is essential for navigating the complexities of modern product innovation. This guide will delve deeper into each aspect, providing technical professionals with the knowledge and tools needed to excel in their roles and contribute to successful product outcomes. + +Teams Involved +-------------- + +# Teams Involved + +In the complex landscape of product development, multiple teams collaborate to ensure the successful delivery of a product from conception to deployment. Each team plays a critical role in the workflow, contributing their expertise to different stages of the process. This section provides a detailed overview of the roles and responsibilities of the key teams involved: the Product Team, the Engineering Team, the QA Team, and the Operations Team. + +## Product Team + +The Product Team is at the forefront of the product development process, responsible for setting the vision and direction of the product. Their roles include: + +- **Discover:** + - **Collect:** The Product Team gathers ideas and inputs from various sources, including customers, sales teams, and internal stakeholders. This stage is crucial for understanding market needs and identifying potential opportunities. + - **Qualify:** Once ideas are collected, the team analyzes them to ensure alignment with business objectives and feasibility. This involves evaluating the potential impact and prioritizing ideas based on strategic goals. + +- **Define:** + - **Roadmap Creation:** The Product Team develops a product roadmap that outlines the strategic direction and key milestones. This roadmap serves as a guiding document for all teams involved in the development process. + - **Requirements Specification:** Detailed product requirements are documented, providing clear guidance for the Engineering Team. This includes user stories, acceptance criteria, and any necessary technical specifications. + +## Engineering Team + +The Engineering Team is responsible for transforming the product vision into a tangible, functional product. Their roles encompass: + +- **Design and Development:** + - **Architecture Design:** Engineers design the system architecture, ensuring scalability, reliability, and performance. This involves selecting appropriate technologies and frameworks. + - **Implementation:** The team writes code and develops features according to the specifications provided by the Product Team. They ensure that the product is built to meet the defined requirements. + +- **Integration:** + - **Tool Integration:** Engineers integrate various tools for ticketing, roadmaps, and management dashboards to streamline the development process and enhance collaboration across teams. + - **Continuous Integration/Continuous Deployment (CI/CD):** The team implements CI/CD pipelines to automate testing and deployment, ensuring rapid and reliable delivery of new features and updates. + +## QA Team + +The QA (Quality Assurance) Team plays a pivotal role in maintaining the quality and reliability of the product. Their responsibilities include: + +- **Testing:** + - **Test Planning:** The QA Team develops comprehensive test plans that cover all aspects of the product, including functionality, performance, and security. + - **Execution:** They conduct various types of testing, such as unit testing, integration testing, and user acceptance testing, to identify and resolve defects before the product reaches the end-users. + +- **Quality Control:** + - **Defect Management:** The team tracks and manages defects using ticketing systems, ensuring that issues are addressed promptly and effectively. + - **Continuous Improvement:** QA professionals analyze testing outcomes to identify areas for improvement, contributing to the enhancement of product quality over time. + +## Operations Team + +The Operations Team ensures that the product is deployed smoothly and operates efficiently in the production environment. Their roles include: + +- **Deployment:** + - **Release Management:** The Operations Team manages the release process, coordinating with other teams to ensure that deployments are executed without disruptions. + - **Environment Configuration:** They configure and maintain the production environment, ensuring that it meets the necessary requirements for optimal performance. + +- **Monitoring and Support:** + - **System Monitoring:** The team implements monitoring tools to track system performance and detect issues in real-time. This proactive approach helps in maintaining high availability and reliability. + - **Incident Response:** In the event of system failures or performance issues, the Operations Team is responsible for incident management and resolution, minimizing downtime and impact on users. + +Each team plays a vital role in the product development lifecycle, and their collaboration is essential for delivering high-quality products that meet customer needs and business objectives. By integrating tools and processes effectively, these teams ensure a seamless workflow from ideation to deployment. + +Workflow Stages +--------------- + +# Workflow Stages + +In the product development lifecycle, understanding the workflow stages is crucial for ensuring seamless collaboration among various teams and achieving successful product outcomes. This section provides a detailed overview of the workflow stages, focusing on the roles of the product, engineering, QA, and operations teams, and the integration of tools for ticketing, roadmaps, and management dashboards. + +## Input + +The initial stage of the workflow involves gathering inputs from various sources to fuel the product development process. These inputs are critical for identifying potential opportunities and challenges. + +- **Sources:** + - **Customers:** Feedback and suggestions from end-users provide valuable insights into product improvements and new features. + - **Sales:** Information from the sales team highlights market demands and competitive landscape, guiding product prioritization. + - **Internal Ideas:** Contributions from team members across the organization can lead to innovative solutions and enhancements. + +## Product Team Processes + +The product team plays a pivotal role in transforming raw inputs into actionable plans. This stage is divided into several key processes: + +- **Discover:** + - **Collect:** The product team gathers ideas and inputs from various sources, ensuring a comprehensive understanding of user needs and market trends. + - **Qualify:** Ideas are analyzed and matched against business objectives and feasibility to determine their potential impact and alignment with the company's vision. + +- **Define:** + - **Prioritize:** The team prioritizes ideas based on strategic importance, resource availability, and potential ROI. + - **Plan:** Detailed plans are developed, outlining the scope, objectives, and timelines for each initiative. + +- **Shape:** + - **Design:** The product team collaborates with designers to create wireframes and prototypes, ensuring the proposed solutions are user-friendly and effective. + - **Specification:** Detailed specifications are documented, providing clear guidance for the engineering team. + +## Engineering Team Processes + +Once the product team has defined and shaped the product, the engineering team takes over to assess and develop the technical aspects. + +- **Assessment:** + - **Feasibility Study:** Engineers evaluate the technical feasibility of the proposed solutions, identifying potential challenges and resource requirements. + - **Technical Planning:** A detailed technical plan is created, outlining the architecture, technologies, and tools to be used. + +- **Development:** + - **Implementation:** The engineering team begins coding and building the product, adhering to the specifications and timelines. + - **Integration:** New features and updates are integrated into the existing system, ensuring compatibility and performance. + +## QA Team Processes + +Quality assurance is a critical stage in the workflow, ensuring that the product meets the highest standards before deployment. + +- **Testing:** + - **Unit Testing:** Individual components are tested to ensure they function correctly in isolation. + - **Integration Testing:** The product is tested as a whole to verify that all components work together seamlessly. + +- **Validation:** + - **User Acceptance Testing (UAT):** The product is tested in real-world scenarios to validate its functionality and usability. + - **Bug Fixing:** Any issues identified during testing are addressed and resolved promptly. + +## Operations Team Processes + +The final stage involves deploying the product and monitoring its performance in the live environment. + +- **Deployment:** + - **Release Management:** The operations team manages the release process, ensuring a smooth transition from development to production. + - **Configuration:** The product is configured for optimal performance and security in the live environment. + +- **Monitoring:** + - **Performance Monitoring:** Continuous monitoring of the product's performance helps identify and address any issues proactively. + - **Feedback Loop:** Feedback from users and performance data are collected to inform future improvements and updates. + +In conclusion, each stage of the workflow is integral to the success of product development. By clearly defining roles and processes, and leveraging tools for ticketing, roadmaps, and management dashboards, teams can collaborate effectively to deliver high-quality products that meet user needs and business objectives. + +Tool Integration +---------------- + +Title: Tool Integration + +In the realm of product development, the integration of various tools is crucial to streamline processes, enhance collaboration, and ensure efficient workflow management. This section delves into the essential tools used in product development, focusing on ticketing systems, roadmap tools, and management dashboards. Each tool plays a pivotal role in facilitating communication and coordination among the product, engineering, QA, and operations teams. + +## Ticketing Systems + +Ticketing systems are the backbone of issue tracking and task management within product development. These systems enable teams to log, prioritize, and track the progress of tasks and issues throughout the development lifecycle. + +### Key Features: +- **Issue Tracking:** Allows teams to report bugs, feature requests, and other tasks, ensuring nothing falls through the cracks. +- **Prioritization:** Facilitates the organization of tasks based on urgency and importance, helping teams focus on high-impact work. +- **Collaboration:** Provides a platform for team members to discuss issues, share updates, and collaborate on solutions. +- **Integration:** Often integrates with other tools such as version control systems and CI/CD pipelines to provide a seamless workflow. + +### Examples: +- **Jira:** Widely used for its robust features and flexibility, Jira supports agile methodologies and offers extensive customization options. +- **Zendesk:** Known for its customer support capabilities, Zendesk also provides ticketing solutions that integrate customer feedback directly into the development process. + +## Roadmap Tools + +Roadmap tools are essential for strategic planning and communication of product vision and progress. They help align the product team’s efforts with business goals and provide a clear timeline for stakeholders. + +### Key Features: +- **Visualization:** Offers visual representations of product timelines, milestones, and dependencies, making it easier to communicate plans. +- **Collaboration:** Enables cross-functional teams to contribute to and update the roadmap, ensuring alignment across departments. +- **Flexibility:** Allows for adjustments as priorities shift, ensuring the roadmap remains relevant and actionable. + +### Examples: +- **Aha!:** A comprehensive tool that supports product strategy, planning, and roadmapping, with features for capturing ideas and aligning them with business objectives. +- **ProductPlan:** Known for its intuitive interface, ProductPlan allows teams to create and share roadmaps easily, facilitating stakeholder engagement. + +## Management Dashboards + +Management dashboards provide a high-level overview of project status, performance metrics, and key performance indicators (KPIs). They are crucial for decision-making and ensuring that projects stay on track. + +### Key Features: +- **Real-Time Data:** Offers up-to-date insights into project progress, resource allocation, and team performance. +- **Customization:** Allows managers to tailor dashboards to display the most relevant data for their specific needs. +- **Integration:** Connects with various data sources to provide a comprehensive view of the project landscape. + +### Examples: +- **Tableau:** A powerful analytics platform that enables the creation of interactive dashboards, providing deep insights into project data. +- **Power BI:** Microsoft's business analytics service that delivers robust data visualization and reporting capabilities, integrating seamlessly with other Microsoft tools. + +In conclusion, the integration of ticketing systems, roadmap tools, and management dashboards is vital for the efficient operation of product development teams. These tools not only enhance communication and collaboration but also provide the necessary infrastructure to manage complex workflows and align team efforts with strategic objectives. By leveraging these tools, teams can ensure a more organized, transparent, and effective product development process. + +Conclusion +---------- + +# Conclusion + +In this guide, we have explored the intricate workflow and team roles that are essential in the product development process. By understanding these components, teams can enhance their efficiency and effectiveness in bringing products to market. This conclusion will summarize the key aspects of the workflow and team roles, as well as highlight the benefits of integrating tools that facilitate seamless collaboration and management. + +## Summary of Workflow and Team Roles + +The product development process is a collaborative effort that involves multiple teams, each with distinct roles and responsibilities. The workflow begins with the **Product Team**, which is responsible for the discovery phase. This phase involves collecting inputs from various sources such as customers, sales, and internal ideas, and qualifying these inputs against business objectives and market needs. + +Once the product requirements are defined, the **Engineering Team** takes over to design and develop the product. This stage is critical as it transforms ideas into tangible solutions. The engineering team works closely with the product team to ensure that the technical specifications align with the product vision. + +The **Quality Assurance (QA) Team** plays a pivotal role in maintaining the integrity of the product. Through rigorous testing and validation, the QA team ensures that the product meets the required standards and functions as intended. Their feedback is crucial for identifying and rectifying defects before the product reaches the market. + +Finally, the **Operations Team** is responsible for deploying and maintaining the product. They ensure that the product is delivered efficiently and that any operational issues are promptly addressed. This team also monitors the product's performance and gathers data to inform future development cycles. + +## Benefits of Integrated Tools + +The integration of tools for ticketing, roadmaps, and management dashboards significantly enhances the product development process. These tools provide a centralized platform for tracking progress, managing tasks, and facilitating communication across teams. + +- **Ticketing Systems**: These systems streamline issue tracking and resolution, allowing teams to prioritize tasks and allocate resources effectively. By maintaining a clear record of issues and resolutions, teams can improve their response times and reduce downtime. + +- **Roadmaps**: Product roadmaps offer a strategic overview of the product's development trajectory. They help teams align their efforts with long-term goals and ensure that all stakeholders are informed of the product's progress and future direction. + +- **Management Dashboards**: Dashboards provide real-time insights into the development process, enabling managers to make informed decisions. They offer visibility into key performance indicators (KPIs) and facilitate the identification of bottlenecks or areas for improvement. + +In conclusion, a well-defined workflow and clear team roles are fundamental to successful product development. By leveraging integrated tools, teams can enhance their collaboration, streamline processes, and ultimately deliver high-quality products that meet market demands. As organizations continue to evolve, embracing these practices will be crucial for maintaining a competitive edge in the ever-changing landscape of product development. + +CONCLUSION +---------- + +Conclusion + +In this guide, "Comprehensive Workflow and Team Roles in Product Development," we have explored the intricate processes and collaborative efforts that drive successful product development. By dissecting the workflow, we have highlighted the critical roles played by various teams, including product management, engineering, quality assurance (QA), and operations. Each team's responsibilities are pivotal in ensuring that the product development lifecycle is efficient, effective, and aligned with organizational goals. + +Key Points Summary: +- **Product Development Workflow**: We detailed the sequential and iterative processes involved in product development, emphasizing the importance of clear communication and structured phases from ideation to deployment. +- **Team Roles**: The guide outlined the specific roles and responsibilities of the product, engineering, QA, and operations teams. Each team contributes uniquely to the development process, ensuring that products are not only built to specifications but also meet quality standards and operational requirements. +- **Tool Integration**: We discussed the integration of various tools that facilitate seamless workflow management. Tools for ticketing, roadmaps, and management dashboards play a crucial role in tracking progress, managing tasks, and ensuring transparency across teams. + +Closure and Recommendations: +Understanding the workflow and team roles in product development is essential for any organization aiming to enhance its product delivery capabilities. By implementing structured processes and fostering collaboration across teams, organizations can improve efficiency, reduce time-to-market, and increase product quality. It is recommended that teams continuously evaluate and refine their workflows and tool integrations to adapt to evolving project needs and technological advancements. + +Next Steps: +- Encourage cross-functional training to enhance team collaboration and understanding of each other's roles. +- Regularly review and update tool integrations to ensure they align with current project requirements and industry standards. +- Foster a culture of continuous improvement by soliciting feedback from all team members and stakeholders. + +Significance: +This guide serves as a foundational resource for technical teams and project managers involved in product development. By providing a comprehensive overview of workflows and team roles, it equips readers with the knowledge to optimize their development processes and achieve successful product outcomes. As the landscape of product development continues to evolve, staying informed and adaptable will be key to maintaining a competitive edge. + +Thank you for engaging with this guide. We hope it serves as a valuable asset in your product development endeavors. diff --git a/static/3_generated_code.py b/static/3_generated_code.py new file mode 100644 index 00000000..3b2db9ae --- /dev/null +++ b/static/3_generated_code.py @@ -0,0 +1,38 @@ +inputFiles = [] # DO NOT CHANGE THIS LINE + +def is_prime(n): + if n <= 1: + return False + if n <= 3: + return True + if n % 2 == 0 or n % 3 == 0: + return False + i = 5 + while i * i <= n: + if n % i == 0 or n % (i + 2) == 0: + return False + i += 6 + return True + +def generate_primes(limit): + primes = [] + num = 2 + while len(primes) < limit: + if is_prime(num): + primes.append(num) + num += 1 + return primes + +primes = generate_primes(1000) +prime_numbers_content = "\n".join(map(str, primes)) + +result = { + "prime_numbers.txt": { + "content": prime_numbers_content, + "base64Encoded": False, + "contentType": "text/plain" + } +} + +import json +print(json.dumps(result)) \ No newline at end of file diff --git a/static/4_execution_history.json b/static/4_execution_history.json new file mode 100644 index 00000000..7ee8aa63 --- /dev/null +++ b/static/4_execution_history.json @@ -0,0 +1,19 @@ +[ + { + "attempt": 1, + "code": "inputFiles = [] # DO NOT CHANGE THIS LINE\n\ndef is_prime(n):\n if n <= 1:\n return False\n if n <= 3:\n return True\n if n % 2 == 0 or n % 3 == 0:\n return False\n i = 5\n while i * i <= n:\n if n % i == 0 or n % (i + 2) == 0:\n return False\n i += 6\n return True\n\ndef generate_primes(limit):\n primes = []\n num = 2\n while len(primes) < limit:\n if is_prime(num):\n primes.append(num)\n num += 1\n return primes\n\nprimes = generate_primes(1000)\nprime_numbers_content = \"\\n\".join(map(str, primes))\n\nresult = {\n \"prime_numbers.txt\": {\n \"content\": prime_numbers_content,\n \"base64Encoded\": False,\n \"contentType\": \"text/plain\"\n }\n}\n\nimport json\nprint(json.dumps(result))", + "result": { + "success": true, + "output": "{\"prime_numbers.txt\": {\"content\": \"2\\n3\\n5\\n7\\n11\\n13\\n17\\n19\\n23\\n29\\n31\\n37\\n41\\n43\\n47\\n53\\n59\\n61\\n67\\n71\\n73\\n79\\n83\\n89\\n97\\n101\\n103\\n107\\n109\\n113\\n127\\n131\\n137\\n139\\n149\\n151\\n157\\n163\\n167\\n173\\n179\\n181\\n191\\n193\\n197\\n199\\n211\\n223\\n227\\n229\\n233\\n239\\n241\\n251\\n257\\n263\\n269\\n271\\n277\\n281\\n283\\n293\\n307\\n311\\n313\\n317\\n331\\n337\\n347\\n349\\n353\\n359\\n367\\n373\\n379\\n383\\n389\\n397\\n401\\n409\\n419\\n421\\n431\\n433\\n439\\n443\\n449\\n457\\n461\\n463\\n467\\n479\\n487\\n491\\n499\\n503\\n509\\n521\\n523\\n541\\n547\\n557\\n563\\n569\\n571\\n577\\n587\\n593\\n599\\n601\\n607\\n613\\n617\\n619\\n631\\n641\\n643\\n647\\n653\\n659\\n661\\n673\\n677\\n683\\n691\\n701\\n709\\n719\\n727\\n733\\n739\\n743\\n751\\n757\\n761\\n769\\n773\\n787\\n797\\n809\\n811\\n821\\n823\\n827\\n829\\n839\\n853\\n857\\n859\\n863\\n877\\n881\\n883\\n887\\n907\\n911\\n919\\n929\\n937\\n941\\n947\\n953\\n967\\n971\\n977\\n983\\n991\\n997\\n1009\\n1013\\n1019\\n1021\\n1031\\n1033\\n1039\\n1049\\n1051\\n1061\\n1063\\n1069\\n1087\\n1091\\n1093\\n1097\\n1103\\n1109\\n1117\\n1123\\n1129\\n1151\\n1153\\n1163\\n1171\\n1181\\n1187\\n1193\\n1201\\n1213\\n1217\\n1223\\n1229\\n1231\\n1237\\n1249\\n1259\\n1277\\n1279\\n1283\\n1289\\n1291\\n1297\\n1301\\n1303\\n1307\\n1319\\n1321\\n1327\\n1361\\n1367\\n1373\\n1381\\n1399\\n1409\\n1423\\n1427\\n1429\\n1433\\n1439\\n1447\\n1451\\n1453\\n1459\\n1471\\n1481\\n1483\\n1487\\n1489\\n1493\\n1499\\n1511\\n1523\\n1531\\n1543\\n1549\\n1553\\n1559\\n1567\\n1571\\n1579\\n1583\\n1597\\n1601\\n1607\\n1609\\n1613\\n1619\\n1621\\n1627\\n1637\\n1657\\n1663\\n1667\\n1669\\n1693\\n1697\\n1699\\n1709\\n1721\\n1723\\n1733\\n1741\\n1747\\n1753\\n1759\\n1777\\n1783\\n1787\\n1789\\n1801\\n1811\\n1823\\n1831\\n1847\\n1861\\n1867\\n1871\\n1873\\n1877\\n1879\\n1889\\n1901\\n1907\\n1913\\n1931\\n1933\\n1949\\n1951\\n1973\\n1979\\n1987\\n1993\\n1997\\n1999\\n2003\\n2011\\n2017\\n2027\\n2029\\n2039\\n2053\\n2063\\n2069\\n2081\\n2083\\n2087\\n2089\\n2099\\n2111\\n2113\\n2129\\n2131\\n2137\\n2141\\n2143\\n2153\\n2161\\n2179\\n2203\\n2207\\n2213\\n2221\\n2237\\n2239\\n2243\\n2251\\n2267\\n2269\\n2273\\n2281\\n2287\\n2293\\n2297\\n2309\\n2311\\n2333\\n2339\\n2341\\n2347\\n2351\\n2357\\n2371\\n2377\\n2381\\n2383\\n2389\\n2393\\n2399\\n2411\\n2417\\n2423\\n2437\\n2441\\n2447\\n2459\\n2467\\n2473\\n2477\\n2503\\n2521\\n2531\\n2539\\n2543\\n2549\\n2551\\n2557\\n2579\\n2591\\n2593\\n2609\\n2617\\n2621\\n2633\\n2647\\n2657\\n2659\\n2663\\n2671\\n2677\\n2683\\n2687\\n2689\\n2693\\n2699\\n2707\\n2711\\n2713\\n2719\\n2729\\n2731\\n2741\\n2749\\n2753\\n2767\\n2777\\n2789\\n2791\\n2797\\n2801\\n2803\\n2819\\n2833\\n2837\\n2843\\n2851\\n2857\\n2861\\n2879\\n2887\\n2897\\n2903\\n2909\\n2917\\n2927\\n2939\\n2953\\n2957\\n2963\\n2969\\n2971\\n2999\\n3001\\n3011\\n3019\\n3023\\n3037\\n3041\\n3049\\n3061\\n3067\\n3079\\n3083\\n3089\\n3109\\n3119\\n3121\\n3137\\n3163\\n3167\\n3169\\n3181\\n3187\\n3191\\n3203\\n3209\\n3217\\n3221\\n3229\\n3251\\n3253\\n3257\\n3259\\n3271\\n3299\\n3301\\n3307\\n3313\\n3319\\n3323\\n3329\\n3331\\n3343\\n3347\\n3359\\n3361\\n3371\\n3373\\n3389\\n3391\\n3407\\n3413\\n3433\\n3449\\n3457\\n3461\\n3463\\n3467\\n3469\\n3491\\n3499\\n3511\\n3517\\n3527\\n3529\\n3533\\n3539\\n3541\\n3547\\n3557\\n3559\\n3571\\n3581\\n3583\\n3593\\n3607\\n3613\\n3617\\n3623\\n3631\\n3637\\n3643\\n3659\\n3671\\n3673\\n3677\\n3691\\n3697\\n3701\\n3709\\n3719\\n3727\\n3733\\n3739\\n3761\\n3767\\n3769\\n3779\\n3793\\n3797\\n3803\\n3821\\n3823\\n3833\\n3847\\n3851\\n3853\\n3863\\n3877\\n3881\\n3889\\n3907\\n3911\\n3917\\n3919\\n3923\\n3929\\n3931\\n3943\\n3947\\n3967\\n3989\\n4001\\n4003\\n4007\\n4013\\n4019\\n4021\\n4027\\n4049\\n4051\\n4057\\n4073\\n4079\\n4091\\n4093\\n4099\\n4111\\n4127\\n4129\\n4133\\n4139\\n4153\\n4157\\n4159\\n4177\\n4201\\n4211\\n4217\\n4219\\n4229\\n4231\\n4241\\n4243\\n4253\\n4259\\n4261\\n4271\\n4273\\n4283\\n4289\\n4297\\n4327\\n4337\\n4339\\n4349\\n4357\\n4363\\n4373\\n4391\\n4397\\n4409\\n4421\\n4423\\n4441\\n4447\\n4451\\n4457\\n4463\\n4481\\n4483\\n4493\\n4507\\n4513\\n4517\\n4519\\n4523\\n4547\\n4549\\n4561\\n4567\\n4583\\n4591\\n4597\\n4603\\n4621\\n4637\\n4639\\n4643\\n4649\\n4651\\n4657\\n4663\\n4673\\n4679\\n4691\\n4703\\n4721\\n4723\\n4729\\n4733\\n4751\\n4759\\n4783\\n4787\\n4789\\n4793\\n4799\\n4801\\n4813\\n4817\\n4831\\n4861\\n4871\\n4877\\n4889\\n4903\\n4909\\n4919\\n4931\\n4933\\n4937\\n4943\\n4951\\n4957\\n4967\\n4969\\n4973\\n4987\\n4993\\n4999\\n5003\\n5009\\n5011\\n5021\\n5023\\n5039\\n5051\\n5059\\n5077\\n5081\\n5087\\n5099\\n5101\\n5107\\n5113\\n5119\\n5147\\n5153\\n5167\\n5171\\n5179\\n5189\\n5197\\n5209\\n5227\\n5231\\n5233\\n5237\\n5261\\n5273\\n5279\\n5281\\n5297\\n5303\\n5309\\n5323\\n5333\\n5347\\n5351\\n5381\\n5387\\n5393\\n5399\\n5407\\n5413\\n5417\\n5419\\n5431\\n5437\\n5441\\n5443\\n5449\\n5471\\n5477\\n5479\\n5483\\n5501\\n5503\\n5507\\n5519\\n5521\\n5527\\n5531\\n5557\\n5563\\n5569\\n5573\\n5581\\n5591\\n5623\\n5639\\n5641\\n5647\\n5651\\n5653\\n5657\\n5659\\n5669\\n5683\\n5689\\n5693\\n5701\\n5711\\n5717\\n5737\\n5741\\n5743\\n5749\\n5779\\n5783\\n5791\\n5801\\n5807\\n5813\\n5821\\n5827\\n5839\\n5843\\n5849\\n5851\\n5857\\n5861\\n5867\\n5869\\n5879\\n5881\\n5897\\n5903\\n5923\\n5927\\n5939\\n5953\\n5981\\n5987\\n6007\\n6011\\n6029\\n6037\\n6043\\n6047\\n6053\\n6067\\n6073\\n6079\\n6089\\n6091\\n6101\\n6113\\n6121\\n6131\\n6133\\n6143\\n6151\\n6163\\n6173\\n6197\\n6199\\n6203\\n6211\\n6217\\n6221\\n6229\\n6247\\n6257\\n6263\\n6269\\n6271\\n6277\\n6287\\n6299\\n6301\\n6311\\n6317\\n6323\\n6329\\n6337\\n6343\\n6353\\n6359\\n6361\\n6367\\n6373\\n6379\\n6389\\n6397\\n6421\\n6427\\n6449\\n6451\\n6469\\n6473\\n6481\\n6491\\n6521\\n6529\\n6547\\n6551\\n6553\\n6563\\n6569\\n6571\\n6577\\n6581\\n6599\\n6607\\n6619\\n6637\\n6653\\n6659\\n6661\\n6673\\n6679\\n6689\\n6691\\n6701\\n6703\\n6709\\n6719\\n6733\\n6737\\n6761\\n6763\\n6779\\n6781\\n6791\\n6793\\n6803\\n6823\\n6827\\n6829\\n6833\\n6841\\n6857\\n6863\\n6869\\n6871\\n6883\\n6899\\n6907\\n6911\\n6917\\n6947\\n6949\\n6959\\n6961\\n6967\\n6971\\n6977\\n6983\\n6991\\n6997\\n7001\\n7013\\n7019\\n7027\\n7039\\n7043\\n7057\\n7069\\n7079\\n7103\\n7109\\n7121\\n7127\\n7129\\n7151\\n7159\\n7177\\n7187\\n7193\\n7207\\n7211\\n7213\\n7219\\n7229\\n7237\\n7243\\n7247\\n7253\\n7283\\n7297\\n7307\\n7309\\n7321\\n7331\\n7333\\n7349\\n7351\\n7369\\n7393\\n7411\\n7417\\n7433\\n7451\\n7457\\n7459\\n7477\\n7481\\n7487\\n7489\\n7499\\n7507\\n7517\\n7523\\n7529\\n7537\\n7541\\n7547\\n7549\\n7559\\n7561\\n7573\\n7577\\n7583\\n7589\\n7591\\n7603\\n7607\\n7621\\n7639\\n7643\\n7649\\n7669\\n7673\\n7681\\n7687\\n7691\\n7699\\n7703\\n7717\\n7723\\n7727\\n7741\\n7753\\n7757\\n7759\\n7789\\n7793\\n7817\\n7823\\n7829\\n7841\\n7853\\n7867\\n7873\\n7877\\n7879\\n7883\\n7901\\n7907\\n7919\", \"base64Encoded\": false, \"contentType\": \"text/plain\"}}\n", + "error": "", + "result": { + "prime_numbers.txt": { + "content": "2\n3\n5\n7\n11\n13\n17\n19\n23\n29\n31\n37\n41\n43\n47\n53\n59\n61\n67\n71\n73\n79\n83\n89\n97\n101\n103\n107\n109\n113\n127\n131\n137\n139\n149\n151\n157\n163\n167\n173\n179\n181\n191\n193\n197\n199\n211\n223\n227\n229\n233\n239\n241\n251\n257\n263\n269\n271\n277\n281\n283\n293\n307\n311\n313\n317\n331\n337\n347\n349\n353\n359\n367\n373\n379\n383\n389\n397\n401\n409\n419\n421\n431\n433\n439\n443\n449\n457\n461\n463\n467\n479\n487\n491\n499\n503\n509\n521\n523\n541\n547\n557\n563\n569\n571\n577\n587\n593\n599\n601\n607\n613\n617\n619\n631\n641\n643\n647\n653\n659\n661\n673\n677\n683\n691\n701\n709\n719\n727\n733\n739\n743\n751\n757\n761\n769\n773\n787\n797\n809\n811\n821\n823\n827\n829\n839\n853\n857\n859\n863\n877\n881\n883\n887\n907\n911\n919\n929\n937\n941\n947\n953\n967\n971\n977\n983\n991\n997\n1009\n1013\n1019\n1021\n1031\n1033\n1039\n1049\n1051\n1061\n1063\n1069\n1087\n1091\n1093\n1097\n1103\n1109\n1117\n1123\n1129\n1151\n1153\n1163\n1171\n1181\n1187\n1193\n1201\n1213\n1217\n1223\n1229\n1231\n1237\n1249\n1259\n1277\n1279\n1283\n1289\n1291\n1297\n1301\n1303\n1307\n1319\n1321\n1327\n1361\n1367\n1373\n1381\n1399\n1409\n1423\n1427\n1429\n1433\n1439\n1447\n1451\n1453\n1459\n1471\n1481\n1483\n1487\n1489\n1493\n1499\n1511\n1523\n1531\n1543\n1549\n1553\n1559\n1567\n1571\n1579\n1583\n1597\n1601\n1607\n1609\n1613\n1619\n1621\n1627\n1637\n1657\n1663\n1667\n1669\n1693\n1697\n1699\n1709\n1721\n1723\n1733\n1741\n1747\n1753\n1759\n1777\n1783\n1787\n1789\n1801\n1811\n1823\n1831\n1847\n1861\n1867\n1871\n1873\n1877\n1879\n1889\n1901\n1907\n1913\n1931\n1933\n1949\n1951\n1973\n1979\n1987\n1993\n1997\n1999\n2003\n2011\n2017\n2027\n2029\n2039\n2053\n2063\n2069\n2081\n2083\n2087\n2089\n2099\n2111\n2113\n2129\n2131\n2137\n2141\n2143\n2153\n2161\n2179\n2203\n2207\n2213\n2221\n2237\n2239\n2243\n2251\n2267\n2269\n2273\n2281\n2287\n2293\n2297\n2309\n2311\n2333\n2339\n2341\n2347\n2351\n2357\n2371\n2377\n2381\n2383\n2389\n2393\n2399\n2411\n2417\n2423\n2437\n2441\n2447\n2459\n2467\n2473\n2477\n2503\n2521\n2531\n2539\n2543\n2549\n2551\n2557\n2579\n2591\n2593\n2609\n2617\n2621\n2633\n2647\n2657\n2659\n2663\n2671\n2677\n2683\n2687\n2689\n2693\n2699\n2707\n2711\n2713\n2719\n2729\n2731\n2741\n2749\n2753\n2767\n2777\n2789\n2791\n2797\n2801\n2803\n2819\n2833\n2837\n2843\n2851\n2857\n2861\n2879\n2887\n2897\n2903\n2909\n2917\n2927\n2939\n2953\n2957\n2963\n2969\n2971\n2999\n3001\n3011\n3019\n3023\n3037\n3041\n3049\n3061\n3067\n3079\n3083\n3089\n3109\n3119\n3121\n3137\n3163\n3167\n3169\n3181\n3187\n3191\n3203\n3209\n3217\n3221\n3229\n3251\n3253\n3257\n3259\n3271\n3299\n3301\n3307\n3313\n3319\n3323\n3329\n3331\n3343\n3347\n3359\n3361\n3371\n3373\n3389\n3391\n3407\n3413\n3433\n3449\n3457\n3461\n3463\n3467\n3469\n3491\n3499\n3511\n3517\n3527\n3529\n3533\n3539\n3541\n3547\n3557\n3559\n3571\n3581\n3583\n3593\n3607\n3613\n3617\n3623\n3631\n3637\n3643\n3659\n3671\n3673\n3677\n3691\n3697\n3701\n3709\n3719\n3727\n3733\n3739\n3761\n3767\n3769\n3779\n3793\n3797\n3803\n3821\n3823\n3833\n3847\n3851\n3853\n3863\n3877\n3881\n3889\n3907\n3911\n3917\n3919\n3923\n3929\n3931\n3943\n3947\n3967\n3989\n4001\n4003\n4007\n4013\n4019\n4021\n4027\n4049\n4051\n4057\n4073\n4079\n4091\n4093\n4099\n4111\n4127\n4129\n4133\n4139\n4153\n4157\n4159\n4177\n4201\n4211\n4217\n4219\n4229\n4231\n4241\n4243\n4253\n4259\n4261\n4271\n4273\n4283\n4289\n4297\n4327\n4337\n4339\n4349\n4357\n4363\n4373\n4391\n4397\n4409\n4421\n4423\n4441\n4447\n4451\n4457\n4463\n4481\n4483\n4493\n4507\n4513\n4517\n4519\n4523\n4547\n4549\n4561\n4567\n4583\n4591\n4597\n4603\n4621\n4637\n4639\n4643\n4649\n4651\n4657\n4663\n4673\n4679\n4691\n4703\n4721\n4723\n4729\n4733\n4751\n4759\n4783\n4787\n4789\n4793\n4799\n4801\n4813\n4817\n4831\n4861\n4871\n4877\n4889\n4903\n4909\n4919\n4931\n4933\n4937\n4943\n4951\n4957\n4967\n4969\n4973\n4987\n4993\n4999\n5003\n5009\n5011\n5021\n5023\n5039\n5051\n5059\n5077\n5081\n5087\n5099\n5101\n5107\n5113\n5119\n5147\n5153\n5167\n5171\n5179\n5189\n5197\n5209\n5227\n5231\n5233\n5237\n5261\n5273\n5279\n5281\n5297\n5303\n5309\n5323\n5333\n5347\n5351\n5381\n5387\n5393\n5399\n5407\n5413\n5417\n5419\n5431\n5437\n5441\n5443\n5449\n5471\n5477\n5479\n5483\n5501\n5503\n5507\n5519\n5521\n5527\n5531\n5557\n5563\n5569\n5573\n5581\n5591\n5623\n5639\n5641\n5647\n5651\n5653\n5657\n5659\n5669\n5683\n5689\n5693\n5701\n5711\n5717\n5737\n5741\n5743\n5749\n5779\n5783\n5791\n5801\n5807\n5813\n5821\n5827\n5839\n5843\n5849\n5851\n5857\n5861\n5867\n5869\n5879\n5881\n5897\n5903\n5923\n5927\n5939\n5953\n5981\n5987\n6007\n6011\n6029\n6037\n6043\n6047\n6053\n6067\n6073\n6079\n6089\n6091\n6101\n6113\n6121\n6131\n6133\n6143\n6151\n6163\n6173\n6197\n6199\n6203\n6211\n6217\n6221\n6229\n6247\n6257\n6263\n6269\n6271\n6277\n6287\n6299\n6301\n6311\n6317\n6323\n6329\n6337\n6343\n6353\n6359\n6361\n6367\n6373\n6379\n6389\n6397\n6421\n6427\n6449\n6451\n6469\n6473\n6481\n6491\n6521\n6529\n6547\n6551\n6553\n6563\n6569\n6571\n6577\n6581\n6599\n6607\n6619\n6637\n6653\n6659\n6661\n6673\n6679\n6689\n6691\n6701\n6703\n6709\n6719\n6733\n6737\n6761\n6763\n6779\n6781\n6791\n6793\n6803\n6823\n6827\n6829\n6833\n6841\n6857\n6863\n6869\n6871\n6883\n6899\n6907\n6911\n6917\n6947\n6949\n6959\n6961\n6967\n6971\n6977\n6983\n6991\n6997\n7001\n7013\n7019\n7027\n7039\n7043\n7057\n7069\n7079\n7103\n7109\n7121\n7127\n7129\n7151\n7159\n7177\n7187\n7193\n7207\n7211\n7213\n7219\n7229\n7237\n7243\n7247\n7253\n7283\n7297\n7307\n7309\n7321\n7331\n7333\n7349\n7351\n7369\n7393\n7411\n7417\n7433\n7451\n7457\n7459\n7477\n7481\n7487\n7489\n7499\n7507\n7517\n7523\n7529\n7537\n7541\n7547\n7549\n7559\n7561\n7573\n7577\n7583\n7589\n7591\n7603\n7607\n7621\n7639\n7643\n7649\n7669\n7673\n7681\n7687\n7691\n7699\n7703\n7717\n7723\n7727\n7741\n7753\n7757\n7759\n7789\n7793\n7817\n7823\n7829\n7841\n7853\n7867\n7873\n7877\n7879\n7883\n7901\n7907\n7919", + "base64Encoded": false, + "contentType": "text/plain" + } + }, + "exitCode": 0 + } + } +] \ No newline at end of file diff --git a/static/5_prime_numbers.txt b/static/5_prime_numbers.txt new file mode 100644 index 00000000..4dbadc38 --- /dev/null +++ b/static/5_prime_numbers.txt @@ -0,0 +1,1000 @@ +2 +3 +5 +7 +11 +13 +17 +19 +23 +29 +31 +37 +41 +43 +47 +53 +59 +61 +67 +71 +73 +79 +83 +89 +97 +101 +103 +107 +109 +113 +127 +131 +137 +139 +149 +151 +157 +163 +167 +173 +179 +181 +191 +193 +197 +199 +211 +223 +227 +229 +233 +239 +241 +251 +257 +263 +269 +271 +277 +281 +283 +293 +307 +311 +313 +317 +331 +337 +347 +349 +353 +359 +367 +373 +379 +383 +389 +397 +401 +409 +419 +421 +431 +433 +439 +443 +449 +457 +461 +463 +467 +479 +487 +491 +499 +503 +509 +521 +523 +541 +547 +557 +563 +569 +571 +577 +587 +593 +599 +601 +607 +613 +617 +619 +631 +641 +643 +647 +653 +659 +661 +673 +677 +683 +691 +701 +709 +719 +727 +733 +739 +743 +751 +757 +761 +769 +773 +787 +797 +809 +811 +821 +823 +827 +829 +839 +853 +857 +859 +863 +877 +881 +883 +887 +907 +911 +919 +929 +937 +941 +947 +953 +967 +971 +977 +983 +991 +997 +1009 +1013 +1019 +1021 +1031 +1033 +1039 +1049 +1051 +1061 +1063 +1069 +1087 +1091 +1093 +1097 +1103 +1109 +1117 +1123 +1129 +1151 +1153 +1163 +1171 +1181 +1187 +1193 +1201 +1213 +1217 +1223 +1229 +1231 +1237 +1249 +1259 +1277 +1279 +1283 +1289 +1291 +1297 +1301 +1303 +1307 +1319 +1321 +1327 +1361 +1367 +1373 +1381 +1399 +1409 +1423 +1427 +1429 +1433 +1439 +1447 +1451 +1453 +1459 +1471 +1481 +1483 +1487 +1489 +1493 +1499 +1511 +1523 +1531 +1543 +1549 +1553 +1559 +1567 +1571 +1579 +1583 +1597 +1601 +1607 +1609 +1613 +1619 +1621 +1627 +1637 +1657 +1663 +1667 +1669 +1693 +1697 +1699 +1709 +1721 +1723 +1733 +1741 +1747 +1753 +1759 +1777 +1783 +1787 +1789 +1801 +1811 +1823 +1831 +1847 +1861 +1867 +1871 +1873 +1877 +1879 +1889 +1901 +1907 +1913 +1931 +1933 +1949 +1951 +1973 +1979 +1987 +1993 +1997 +1999 +2003 +2011 +2017 +2027 +2029 +2039 +2053 +2063 +2069 +2081 +2083 +2087 +2089 +2099 +2111 +2113 +2129 +2131 +2137 +2141 +2143 +2153 +2161 +2179 +2203 +2207 +2213 +2221 +2237 +2239 +2243 +2251 +2267 +2269 +2273 +2281 +2287 +2293 +2297 +2309 +2311 +2333 +2339 +2341 +2347 +2351 +2357 +2371 +2377 +2381 +2383 +2389 +2393 +2399 +2411 +2417 +2423 +2437 +2441 +2447 +2459 +2467 +2473 +2477 +2503 +2521 +2531 +2539 +2543 +2549 +2551 +2557 +2579 +2591 +2593 +2609 +2617 +2621 +2633 +2647 +2657 +2659 +2663 +2671 +2677 +2683 +2687 +2689 +2693 +2699 +2707 +2711 +2713 +2719 +2729 +2731 +2741 +2749 +2753 +2767 +2777 +2789 +2791 +2797 +2801 +2803 +2819 +2833 +2837 +2843 +2851 +2857 +2861 +2879 +2887 +2897 +2903 +2909 +2917 +2927 +2939 +2953 +2957 +2963 +2969 +2971 +2999 +3001 +3011 +3019 +3023 +3037 +3041 +3049 +3061 +3067 +3079 +3083 +3089 +3109 +3119 +3121 +3137 +3163 +3167 +3169 +3181 +3187 +3191 +3203 +3209 +3217 +3221 +3229 +3251 +3253 +3257 +3259 +3271 +3299 +3301 +3307 +3313 +3319 +3323 +3329 +3331 +3343 +3347 +3359 +3361 +3371 +3373 +3389 +3391 +3407 +3413 +3433 +3449 +3457 +3461 +3463 +3467 +3469 +3491 +3499 +3511 +3517 +3527 +3529 +3533 +3539 +3541 +3547 +3557 +3559 +3571 +3581 +3583 +3593 +3607 +3613 +3617 +3623 +3631 +3637 +3643 +3659 +3671 +3673 +3677 +3691 +3697 +3701 +3709 +3719 +3727 +3733 +3739 +3761 +3767 +3769 +3779 +3793 +3797 +3803 +3821 +3823 +3833 +3847 +3851 +3853 +3863 +3877 +3881 +3889 +3907 +3911 +3917 +3919 +3923 +3929 +3931 +3943 +3947 +3967 +3989 +4001 +4003 +4007 +4013 +4019 +4021 +4027 +4049 +4051 +4057 +4073 +4079 +4091 +4093 +4099 +4111 +4127 +4129 +4133 +4139 +4153 +4157 +4159 +4177 +4201 +4211 +4217 +4219 +4229 +4231 +4241 +4243 +4253 +4259 +4261 +4271 +4273 +4283 +4289 +4297 +4327 +4337 +4339 +4349 +4357 +4363 +4373 +4391 +4397 +4409 +4421 +4423 +4441 +4447 +4451 +4457 +4463 +4481 +4483 +4493 +4507 +4513 +4517 +4519 +4523 +4547 +4549 +4561 +4567 +4583 +4591 +4597 +4603 +4621 +4637 +4639 +4643 +4649 +4651 +4657 +4663 +4673 +4679 +4691 +4703 +4721 +4723 +4729 +4733 +4751 +4759 +4783 +4787 +4789 +4793 +4799 +4801 +4813 +4817 +4831 +4861 +4871 +4877 +4889 +4903 +4909 +4919 +4931 +4933 +4937 +4943 +4951 +4957 +4967 +4969 +4973 +4987 +4993 +4999 +5003 +5009 +5011 +5021 +5023 +5039 +5051 +5059 +5077 +5081 +5087 +5099 +5101 +5107 +5113 +5119 +5147 +5153 +5167 +5171 +5179 +5189 +5197 +5209 +5227 +5231 +5233 +5237 +5261 +5273 +5279 +5281 +5297 +5303 +5309 +5323 +5333 +5347 +5351 +5381 +5387 +5393 +5399 +5407 +5413 +5417 +5419 +5431 +5437 +5441 +5443 +5449 +5471 +5477 +5479 +5483 +5501 +5503 +5507 +5519 +5521 +5527 +5531 +5557 +5563 +5569 +5573 +5581 +5591 +5623 +5639 +5641 +5647 +5651 +5653 +5657 +5659 +5669 +5683 +5689 +5693 +5701 +5711 +5717 +5737 +5741 +5743 +5749 +5779 +5783 +5791 +5801 +5807 +5813 +5821 +5827 +5839 +5843 +5849 +5851 +5857 +5861 +5867 +5869 +5879 +5881 +5897 +5903 +5923 +5927 +5939 +5953 +5981 +5987 +6007 +6011 +6029 +6037 +6043 +6047 +6053 +6067 +6073 +6079 +6089 +6091 +6101 +6113 +6121 +6131 +6133 +6143 +6151 +6163 +6173 +6197 +6199 +6203 +6211 +6217 +6221 +6229 +6247 +6257 +6263 +6269 +6271 +6277 +6287 +6299 +6301 +6311 +6317 +6323 +6329 +6337 +6343 +6353 +6359 +6361 +6367 +6373 +6379 +6389 +6397 +6421 +6427 +6449 +6451 +6469 +6473 +6481 +6491 +6521 +6529 +6547 +6551 +6553 +6563 +6569 +6571 +6577 +6581 +6599 +6607 +6619 +6637 +6653 +6659 +6661 +6673 +6679 +6689 +6691 +6701 +6703 +6709 +6719 +6733 +6737 +6761 +6763 +6779 +6781 +6791 +6793 +6803 +6823 +6827 +6829 +6833 +6841 +6857 +6863 +6869 +6871 +6883 +6899 +6907 +6911 +6917 +6947 +6949 +6959 +6961 +6967 +6971 +6977 +6983 +6991 +6997 +7001 +7013 +7019 +7027 +7039 +7043 +7057 +7069 +7079 +7103 +7109 +7121 +7127 +7129 +7151 +7159 +7177 +7187 +7193 +7207 +7211 +7213 +7219 +7229 +7237 +7243 +7247 +7253 +7283 +7297 +7307 +7309 +7321 +7331 +7333 +7349 +7351 +7369 +7393 +7411 +7417 +7433 +7451 +7457 +7459 +7477 +7481 +7487 +7489 +7499 +7507 +7517 +7523 +7529 +7537 +7541 +7547 +7549 +7559 +7561 +7573 +7577 +7583 +7589 +7591 +7603 +7607 +7621 +7639 +7643 +7649 +7669 +7673 +7681 +7687 +7691 +7699 +7703 +7717 +7723 +7727 +7741 +7753 +7757 +7759 +7789 +7793 +7817 +7823 +7829 +7841 +7853 +7867 +7873 +7877 +7879 +7883 +7901 +7907 +7919 \ No newline at end of file