Skip to content
Open
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
15 changes: 9 additions & 6 deletions autotest_package/autotest/config/auth_test_data.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"credentials": {
"valid": {
"username": "abc123",
"password": "c!m69hGNQ5cnuVZ"
"username": "superadmin_staging",
"password": "Mindfire$123"
},
"invalid": {
"username": "invaliduser",
Expand All @@ -26,10 +26,11 @@
"contact_form": {
"valid": {
"Name" : {
"First Name": "John",
"Last Name": "Doe"
"First Name": "Ankit",
"Last Name": "Saha"
},
"Email": "abc@gmail.com",
"Email": "ankit.s@mindfiresolutions.com",
"Comment or Message": "Hi there!",
"Gender": "Male",
"Mobile Number": "9312345678",
"Date of Birth": "2 Aug 2000",
Expand All @@ -41,7 +42,9 @@
},
"invalid": {
"First Name": "",
"Last Name": "abc",
"Last Name": "",
"Email": "invalid-email",
"Comment or Message": "",
"UserName": "invalid-username"
}
}
Expand Down
13 changes: 9 additions & 4 deletions autotest_package/autotest/config/llm_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,31 @@
# Provider configurations - all available
providers:
openai:
analysis_model: "gpt-4.1-2025-04-14"
selenium_model: "gpt-4.1-mini-2025-04-14"
analysis_model: "gpt-4.1-mini-2025-04-14"
selenium_model: "gpt-4.1-2025-04-14"
result_analysis_model: "gpt-5-mini-2025-08-07"
temperature: 0.2

groq:
analysis_model: "meta-llama/llama-4-scout-17b-16e-instruct"
selenium_model: "meta-llama/llama-4-maverick-17b-128e-instruct"
result_analysis_model: "meta-llama/llama-4-scout-17b-16e-instruct"
temperature: 0.2

google-gemini:
analysis_model: "gemini-2.5-flash"
selenium_model: "gemini-2.5-flash"
result_analysis_model: "gemini-2.5-flash"
temperature: 0.1

anthropic:
analysis_model: "claude-3-7-sonnet-latest"
selenium_model: "claude-sonnet-4-20250514"
selenium_model: "claude-sonnet-4-20250514"
result_analysis_model: "claude-3-7-sonnet-latest"
temperature: 0.2

ollama:
analysis_model: "qwen2.5-coder:7b-instruct"
selenium_model: "qwen2.5-coder:7b-instruct"
temperature: 0.2
result_analysis_model: "qwen2.5-coder:7b-instruct"
temperature: 0.2
242 changes: 230 additions & 12 deletions autotest_package/autotest/config/prompts4.yaml

Large diffs are not rendered by default.

40 changes: 35 additions & 5 deletions autotest_package/autotest/core/llm_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ def _initialize_models(self):
api_key=api_key,
model=params["selenium_model"],
temperature=params["temperature"]
),
"result_analysis": ChatOpenAI(
api_key=api_key,
model=params["result_analysis_model"],
temperature=1.0,
model_kwargs={"response_format": {"type": "json_object"}}
)
}
elif provider == "groq":
Expand All @@ -114,6 +120,12 @@ def _initialize_models(self):
api_key=api_key,
model=params["selenium_model"],
temperature=params["temperature"]
),
"result_analysis": ChatGroq(
api_key=api_key,
model=params["result_analysis_model"],
temperature=params["temperature"],
model_kwargs={"response_format": {"type": "json_object"}}
)
}
elif provider == "google-gemini":
Expand All @@ -130,7 +142,14 @@ def _initialize_models(self):
api_key=api_key,
model=params["selenium_model"],
temperature=params["temperature"]
)
),
"result_analysis": ChatGoogleGenerativeAI(
# api_key=os.getenv("GOOGLE_API_KEY"),
api_key=api_key,
model=params["result_analysis_model"],
temperature=params["temperature"],
# model_kwargs={"response_format": {"type": "json_object"}}
),
}

elif provider == "anthropic":
Expand All @@ -145,7 +164,13 @@ def _initialize_models(self):
api_key=api_key,
model=params["selenium_model"],
temperature=params["temperature"]
)
),
"result_analysis": ChatAnthropic(
api_key=api_key,
model=params["result_analysis_model"],
temperature=params["temperature"],
# model_kwargs={"response_format": {"type": "json_object"}}
),
}

elif provider == "ollama":
Expand All @@ -158,7 +183,12 @@ def _initialize_models(self):
"selenium": ChatOllama(
model=params["selenium_model"],
temperature=params["temperature"]
)
),
"result_analysis": ChatOllama(
model=params["result_analysis_model"],
temperature=params["temperature"],
format="json" # Native JSON mode for Ollama
),
}
else:
raise ValueError(f"Unsupported provider: {provider}")
Expand All @@ -174,14 +204,14 @@ def generate(self, system_prompt, user_prompt, model_type="analysis"):
Args:
system_prompt (str): System prompt for the model
user_prompt (str): User prompt for the model
model_type (str): Type of model to use ('analysis' or 'selenium')
model_type (str): Type of model to use ('analysis', 'selenium' or 'result_analysis')

Returns:
str: Generated response content
"""

# For providers that don't support response_format, add JSON instruction to prompt
if model_type == "analysis" and self._needs_json_in_prompt():
if (model_type == "analysis" or model_type == "result_analysis") and self._needs_json_in_prompt():
json_instruction = "\n\nIMPORTANT: Please respond with valid JSON format only. Do not include any text outside the JSON structure."
system_prompt += json_instruction

Expand Down
Loading