Update app.py
Browse files
app.py
CHANGED
|
@@ -42,7 +42,7 @@ def query_groq(query):
|
|
| 42 |
return "Error: Please provide a valid query"
|
| 43 |
chat_completion = groq_client.chat.completions.create(
|
| 44 |
messages=[
|
| 45 |
-
{"role": "system", "content": "You are an expert consultant in cybersecurity named Groq Thor.
|
| 46 |
{"role": "user", "content": query}
|
| 47 |
],
|
| 48 |
model="llama3-8b-8192"
|
|
@@ -68,7 +68,7 @@ interface = gr.Interface(
|
|
| 68 |
gr.Dropdown(choices=["OpenAI", "Groq"], label="Provider")
|
| 69 |
],
|
| 70 |
outputs=gr.Textbox(label="Chatbot Response"),
|
| 71 |
-
title="Cybersecurity Chatbot
|
| 72 |
description="Ask cybersecurity questions to Thor, powered by OpenAI or Groq. Select a provider and type your query."
|
| 73 |
)
|
| 74 |
|
|
|
|
| 42 |
return "Error: Please provide a valid query"
|
| 43 |
chat_completion = groq_client.chat.completions.create(
|
| 44 |
messages=[
|
| 45 |
+
{"role": "system", "content": "You are an expert consultant in cybersecurity named Groq Thor. In order to help your users, it is best to get some insights on the problem, organisation etc or get a context."},
|
| 46 |
{"role": "user", "content": query}
|
| 47 |
],
|
| 48 |
model="llama3-8b-8192"
|
|
|
|
| 68 |
gr.Dropdown(choices=["OpenAI", "Groq"], label="Provider")
|
| 69 |
],
|
| 70 |
outputs=gr.Textbox(label="Chatbot Response"),
|
| 71 |
+
title="Cybersecurity Chatbot",
|
| 72 |
description="Ask cybersecurity questions to Thor, powered by OpenAI or Groq. Select a provider and type your query."
|
| 73 |
)
|
| 74 |
|