Spaces:
Sleeping
Sleeping
Improved System Message (#7)
Browse files- feat: Update system message (a59bd602b051975ae4f46930fc0c3b8e597942d8)
- tdagent/grchat.py +17 -2
- uv.lock +1 -1
tdagent/grchat.py
CHANGED
@@ -23,9 +23,24 @@ if TYPE_CHECKING:
|
|
23 |
#### Constants ####
|
24 |
|
25 |
SYSTEM_MESSAGE = SystemMessage(
|
26 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
)
|
28 |
|
|
|
29 |
GRADIO_ROLE_TO_LG_MESSAGE_TYPE = MappingProxyType(
|
30 |
{
|
31 |
"user": HumanMessage,
|
@@ -68,7 +83,7 @@ def create_bedrock_llm(
|
|
68 |
llm = ChatBedrock(
|
69 |
model_id=bedrock_model_id,
|
70 |
client=bedrock_client,
|
71 |
-
model_kwargs={"temperature": 0.
|
72 |
)
|
73 |
except Exception as e: # noqa: BLE001
|
74 |
return None, str(e)
|
|
|
23 |
#### Constants ####
|
24 |
|
25 |
SYSTEM_MESSAGE = SystemMessage(
|
26 |
+
"""
|
27 |
+
You are a security analyst assistant responsible for collecting, analyzing
|
28 |
+
and disseminating actionable intelligence related to cyber threats,
|
29 |
+
vulnerabilities and threat actors.
|
30 |
+
|
31 |
+
When presented with potential incidents information or tickets, you should
|
32 |
+
evaluate the presented evidence, decide what is missing and gather
|
33 |
+
additional data using any tool at your disposal. After gathering more
|
34 |
+
information you must evaluate if the incident is a threat or
|
35 |
+
not and, if possible, remediation actions.
|
36 |
+
|
37 |
+
You must always present the conducted analysis and final conclusion.
|
38 |
+
Never use external means of communication, like emails or SMS, unless
|
39 |
+
instructed to do so.
|
40 |
+
""".strip(),
|
41 |
)
|
42 |
|
43 |
+
|
44 |
GRADIO_ROLE_TO_LG_MESSAGE_TYPE = MappingProxyType(
|
45 |
{
|
46 |
"user": HumanMessage,
|
|
|
83 |
llm = ChatBedrock(
|
84 |
model_id=bedrock_model_id,
|
85 |
client=bedrock_client,
|
86 |
+
model_kwargs={"temperature": 0.8},
|
87 |
)
|
88 |
except Exception as e: # noqa: BLE001
|
89 |
return None, str(e)
|
uv.lock
CHANGED
@@ -1938,7 +1938,7 @@ test = [
|
|
1938 |
|
1939 |
[package.metadata]
|
1940 |
requires-dist = [
|
1941 |
-
{ name = "gradio", extras = ["mcp"], specifier = "
|
1942 |
{ name = "huggingface-hub", specifier = ">=0.32.3" },
|
1943 |
{ name = "langchain-aws", specifier = ">=0.2.24" },
|
1944 |
{ name = "langchain-mcp-adapters", specifier = ">=0.1.1" },
|
|
|
1938 |
|
1939 |
[package.metadata]
|
1940 |
requires-dist = [
|
1941 |
+
{ name = "gradio", extras = ["mcp"], specifier = "~=5.31" },
|
1942 |
{ name = "huggingface-hub", specifier = ">=0.32.3" },
|
1943 |
{ name = "langchain-aws", specifier = ">=0.2.24" },
|
1944 |
{ name = "langchain-mcp-adapters", specifier = ">=0.1.1" },
|