Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 59 additions & 20 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,27 +1,66 @@
# OpenAI API Configuration
OPENAI_API_KEY=
# GitHub Configuration (required)
APP_NAME_GITHUB=your_app_name
APP_CLIENT_ID_GITHUB=your_client_id
APP_CLIENT_SECRET_GITHUB=your_client_secret

# LangChain Configuration
LANGCHAIN_TRACING_V2=true
PRIVATE_KEY_BASE64_GITHUB=your_private_key_base64
WEBHOOK_SECRET_GITHUB=your_webhook_secret

# AI Provider Selection
AI_PROVIDER=openai # Options: openai, bedrock, vertex_ai

# Common AI Settings (defaults for all agents)
AI_MAX_TOKENS=4096
AI_TEMPERATURE=0.1

# OpenAI Configuration (when AI_PROVIDER=openai)
OPENAI_API_KEY=your_openai_api_key_here
OPENAI_MODEL=gpt-4.1-mini # Optional, defaults to gpt-4.1-mini

# AWS Bedrock Configuration (when AI_PROVIDER=bedrock)
# BEDROCK_REGION=us-east-1
# BEDROCK_MODEL_ID=anthropic.claude-3-sonnet-20240229-v1:0
# AWS_ACCESS_KEY_ID=your_aws_access_key # Optional, can use AWS profile instead
# AWS_SECRET_ACCESS_KEY=your_aws_secret_key # Optional, can use AWS profile instead
# AWS_PROFILE=your_aws_profile # Optional, alternative to access keys

# Google Vertex AI Configuration (when AI_PROVIDER=vertex_ai)
# GCP_PROJECT_ID=your-gcp-project-id
# GCP_LOCATION=us-central1
# VERTEX_AI_MODEL=gemini-pro # Options: gemini-pro, gemini-1.5-pro, claude-3-opus@20240229, etc.
# GCP_SERVICE_ACCOUNT_KEY_BASE64=your_base64_encoded_service_account_key # Optional, can use ADC instead

# Engine Agent Configuration
AI_ENGINE_MAX_TOKENS=8000 # Default: 8000
AI_ENGINE_TEMPERATURE=0.1

# Feasibility Agent Configuration
AI_FEASIBILITY_MAX_TOKENS=4096
AI_FEASIBILITY_TEMPERATURE=0.1

# Acknowledgment Agent Configuration
AI_ACKNOWLEDGMENT_MAX_TOKENS=2000
AI_ACKNOWLEDGMENT_TEMPERATURE=0.1

# LangSmith Configuration
LANGCHAIN_TRACING_V2=false
LANGCHAIN_ENDPOINT=https://api.smith.langchain.com
LANGCHAIN_API_KEY=
LANGCHAIN_PROJECT=

# AWS Configuration
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
LANGCHAIN_PROJECT=watchflow-dev

# Application Configuration
ENVIRONMENT=development
# CORS Configuration
CORS_HEADERS=["*"]
CORS_ORIGINS='["http://localhost:3000", "http://127.0.0.1:3000"]'
CORS_ORIGINS=["http://localhost:3000", "http://127.0.0.1:3000", "http://localhost:5500", "https://warestack.github.io", "https://watchflow.dev"]

# Repository Configuration
REPO_CONFIG_BASE_PATH=.watchflow
REPO_CONFIG_RULES_FILE=rules.yaml

# GitHub OAuth Configuration
APP_NAME_GITHUB=
CLIENT_ID_GITHUB=
CLIENT_SECRET_GITHUB=
PRIVATE_KEY_BASE64_GITHUB=
REDIRECT_URI_GITHUB=http://localhost:3000
# Logging Configuration
LOG_LEVEL=INFO
LOG_FORMAT=%(asctime)s - %(name)s - %(levelname)s - %(message)s
LOG_FILE_PATH=

# GitHub Webhook Configuration
WEBHOOK_SECRET_GITHUB=
# Development Settings
DEBUG=false
ENVIRONMENT=development
80 changes: 0 additions & 80 deletions env.example

This file was deleted.

2 changes: 1 addition & 1 deletion src/agents/acknowledgment_agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from src.agents.acknowledgment_agent.models import AcknowledgmentContext, AcknowledgmentEvaluation
from src.agents.acknowledgment_agent.prompts import create_evaluation_prompt, get_system_prompt
from src.agents.base import AgentResult, BaseAgent
from src.core.ai import get_chat_model
from src.providers import get_chat_model

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion src/agents/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from abc import ABC, abstractmethod
from typing import Any, TypeVar

from src.core.ai import get_chat_model
from src.providers import get_chat_model

logger = logging.getLogger(__name__)

Expand Down
6 changes: 5 additions & 1 deletion src/agents/engine_agent/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ class LLMEvaluationResponse(BaseModel):

is_violated: bool = Field(description="Whether the rule is violated")
message: str = Field(description="Explanation of the violation or why the rule passed")
details: dict[str, Any] = Field(description="Detailed reasoning and metadata", default_factory=dict)
details: dict[str, Any] = Field(
description="Detailed reasoning and metadata",
default_factory=dict,
json_schema_extra={"additionalProperties": False},
)
how_to_fix: str | None = Field(description="Specific instructions on how to fix the violation", default=None)


Expand Down
2 changes: 1 addition & 1 deletion src/agents/engine_agent/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
create_validation_strategy_prompt,
get_llm_evaluation_system_prompt,
)
from src.core.ai import get_chat_model
from src.providers import get_chat_model
from src.rules.validators import VALIDATOR_REGISTRY

logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion src/agents/feasibility_agent/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from src.agents.feasibility_agent.models import FeasibilityAnalysis, FeasibilityState, YamlGeneration
from src.agents.feasibility_agent.prompts import RULE_FEASIBILITY_PROMPT, YAML_GENERATION_PROMPT
from src.core.ai import get_chat_model
from src.providers import get_chat_model

logger = logging.getLogger(__name__)

Expand Down
40 changes: 0 additions & 40 deletions src/core/ai.py

This file was deleted.

20 changes: 0 additions & 20 deletions src/core/ai_providers/__init__.py

This file was deleted.

43 changes: 0 additions & 43 deletions src/core/ai_providers/bedrock_provider.py

This file was deleted.

Loading