Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,8 +4,19 @@ import os
|
|
| 4 |
|
| 5 |
client = Groq(api_key=os.environ.get("GROQ_API_KEY"))
|
| 6 |
|
| 7 |
-
SYSTEM_PROMPT = """
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
def respond(message, history, model, temperature, max_tokens):
|
| 11 |
messages = [{"role": "system", "content": SYSTEM_PROMPT}]
|
|
@@ -31,8 +42,8 @@ def respond(message, history, model, temperature, max_tokens):
|
|
| 31 |
# ChatInterface with additional inputs for parameters
|
| 32 |
demo = gr.ChatInterface(
|
| 33 |
fn=respond,
|
| 34 |
-
title="
|
| 35 |
-
description="
|
| 36 |
additional_inputs=[
|
| 37 |
gr.Dropdown(
|
| 38 |
choices=[
|
|
@@ -61,9 +72,9 @@ demo = gr.ChatInterface(
|
|
| 61 |
),
|
| 62 |
],
|
| 63 |
examples=[
|
| 64 |
-
["
|
| 65 |
-
["
|
| 66 |
-
["
|
| 67 |
],
|
| 68 |
theme="soft",
|
| 69 |
)
|
|
|
|
| 4 |
|
| 5 |
client = Groq(api_key=os.environ.get("GROQ_API_KEY"))
|
| 6 |
|
| 7 |
+
SYSTEM_PROMPT = """
|
| 8 |
+
You are a Senior Software Testing Assistant for testers worldwide.
|
| 9 |
+
You help with:
|
| 10 |
+
- Manual testing concepts
|
| 11 |
+
- Writing clear and effective test cases
|
| 12 |
+
- Bug reporting and reproduction steps
|
| 13 |
+
- API testing (Postman, REST, status codes)
|
| 14 |
+
- Test automation concepts and tools
|
| 15 |
+
- Test strategies, test plans, and best practices
|
| 16 |
+
|
| 17 |
+
Always respond in a clear, structured, and professional way.
|
| 18 |
+
Provide examples when possible.
|
| 19 |
+
"""
|
| 20 |
|
| 21 |
def respond(message, history, model, temperature, max_tokens):
|
| 22 |
messages = [{"role": "system", "content": SYSTEM_PROMPT}]
|
|
|
|
| 42 |
# ChatInterface with additional inputs for parameters
|
| 43 |
demo = gr.ChatInterface(
|
| 44 |
fn=respond,
|
| 45 |
+
title="Global Software Testing Assistant",
|
| 46 |
+
description="Your AI assistant for manual testing, automation, API testing, and QA best practices.",
|
| 47 |
additional_inputs=[
|
| 48 |
gr.Dropdown(
|
| 49 |
choices=[
|
|
|
|
| 72 |
),
|
| 73 |
],
|
| 74 |
examples=[
|
| 75 |
+
["Write test cases for a login page"],
|
| 76 |
+
["How to report a bug professionally?"],
|
| 77 |
+
["Explain API testing with Postman"],
|
| 78 |
],
|
| 79 |
theme="soft",
|
| 80 |
)
|